Merge pull request #13689 from MrPetovan/bug/warnings
Fix a few warning messages
This commit is contained in:
commit
3b96690d0c
2 changed files with 5 additions and 5 deletions
|
@ -122,8 +122,8 @@ class Statuses extends BaseApi
|
|||
$existing_media = array_column(Post\Media::getByURIId($post['uri-id'], [Post\Media::AUDIO, Post\Media::VIDEO, Post\Media::IMAGE]), 'id');
|
||||
|
||||
foreach ($request['media_attributes'] as $attributes) {
|
||||
if (in_array($attributes['id'], $existing_media)) {
|
||||
Post\Media::updateById(['description' => $attributes['description']], $attributes['id']);
|
||||
if (!empty($attributes['id']) && in_array($attributes['id'], $existing_media)) {
|
||||
Post\Media::updateById(['description' => $attributes['description'] ?? null], $attributes['id']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1213,7 +1213,7 @@ class Receiver
|
|||
}
|
||||
|
||||
// Fetch the receivers for the public and the followers collection
|
||||
if ((($receiver == $followers) || (($receiver == self::PUBLIC_COLLECTION) && !$isGroup) || ($isGroup && ($element == 'as:audience'))) && !empty($actor)) {
|
||||
if ((($receiver == $followers) || (($receiver == self::PUBLIC_COLLECTION) && !$isGroup) || ($isGroup && ($element == 'as:audience'))) && !empty($profile)) {
|
||||
$receivers = self::getReceiverForActor($tags, $receivers, $follower_target, $profile);
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue