Fix warning
This commit is contained in:
parent
699be97ea1
commit
c1686c486c
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue