From: Michael Date: Wed, 4 Nov 2020 13:14:33 +0000 (+0000) Subject: Handle fatal error when attachment url is null X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=49fee4096acf3b823e66c359d18131e7d419dfb6;p=friendica.git Handle fatal error when attachment url is null --- diff --git a/src/Protocol/ActivityPub/Processor.php b/src/Protocol/ActivityPub/Processor.php index ba18ec8720..5af712fc78 100644 --- a/src/Protocol/ActivityPub/Processor.php +++ b/src/Protocol/ActivityPub/Processor.php @@ -189,7 +189,7 @@ class Processor } $item['body'] .= "\n[video]" . $attach['url'] . '[/video]'; - } else { + } elseif (!empty($attach['url'])) { if (!empty($item['attach'])) { $item['attach'] .= ','; } else { @@ -202,6 +202,8 @@ class Processor $attach['mediaType'] ?? '', $attach['name'] ?? '' ); + } else { + Logger::notice('Unknown attachment', ['attach' => $attach]); } } }