diff --git a/src/Factory/Api/Mastodon/Attachment.php b/src/Factory/Api/Mastodon/Attachment.php index afc2f7c271..6f881808ec 100644 --- a/src/Factory/Api/Mastodon/Attachment.php +++ b/src/Factory/Api/Mastodon/Attachment.php @@ -136,7 +136,7 @@ class Attachment extends BaseFactory $url = $this->baseUrl . '/photo/' . $photo['resource-id'] . '-0.' . $ext; $preview = Photo::selectFirst(['scale'], ["`resource-id` = ? AND `uid` = ? AND `scale` > ?", $photo['resource-id'], $photo['uid'], 0], ['order' => ['scale']]); - if (empty($scale)) { + if (!empty($preview)) { $preview_url = $this->baseUrl . '/photo/' . $photo['resource-id'] . '-' . $preview['scale'] . '.' . $ext; } else { $preview_url = ''; diff --git a/src/Navigation/Notifications/Repository/Notify.php b/src/Navigation/Notifications/Repository/Notify.php index d1256f7d9f..8bfdfbe9a0 100644 --- a/src/Navigation/Notifications/Repository/Notify.php +++ b/src/Navigation/Notifications/Repository/Notify.php @@ -785,7 +785,7 @@ class Notify extends BaseRepository $params['type'] = Model\Notification\Type::COMMENT; $subject = $l10n->t('%1$s Comment to conversation #%2$d by %3$s', $subjectPrefix, $item['parent'], $contact['name']); - if ($params['verb'] = Activity::LIKE) { + if ($params['verb'] == Activity::LIKE) { switch ($Notification->type) { case Model\Post\UserNotification::TYPE_DIRECT_COMMENT: $subject = $l10n->t('%1$s %2$s liked your post #%3$d', $subjectPrefix, $contact['name'], $item['parent']);