From: Michael Date: Mon, 6 Mar 2023 06:43:04 +0000 (+0000) Subject: Fix warning X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c1686c486c8fcb4f94f89df869ae72509f3583fe;p=friendica.git Fix warning --- diff --git a/src/Factory/Api/Mastodon/Card.php b/src/Factory/Api/Mastodon/Card.php index f6f6e3b671..c0bad9beb6 100644 --- a/src/Factory/Api/Mastodon/Card.php +++ b/src/Factory/Api/Mastodon/Card.php @@ -40,7 +40,7 @@ class Card extends BaseFactory public function createFromUriId(int $uriId, array $history = []): \Friendica\Object\Api\Mastodon\Card { $media = Post\Media::getByURIId($uriId, [Post\Media::HTML]); - if (empty($media) && empty($media[0]['description']) && !empty($media[0]['image']) && !empty($media[0]['preview'])) { + if (empty($media) || (empty($media[0]['description']) && empty($media[0]['image']) && empty($media[0]['preview']))) { return new \Friendica\Object\Api\Mastodon\Card([], $history); }