]> git.mxchange.org Git - friendica.git/commitdiff
Fix possible fatal error when body is null
authorMichael <heluecht@pirati.ca>
Tue, 27 Jul 2021 12:25:38 +0000 (12:25 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 27 Jul 2021 12:25:38 +0000 (12:25 +0000)
src/Protocol/ActivityPub/Transmitter.php

index b7a180e06493518f7f31180027ecb891d6996a5a..20b8f2a26221f5bc766c5a4c06a8689e5c2bece5 100644 (file)
@@ -1557,7 +1557,7 @@ class Transmitter
                // The contentMap does contain the unmodified HTML.
                $language = self::getLanguage($item);
                if (!empty($language)) {
-                       $richbody = BBCode::setMentionsToNicknames($item['body']);
+                       $richbody = BBCode::setMentionsToNicknames($item['body'] ?? '');
                        $richbody = BBCode::removeAttachment($richbody);
 
                        $data['contentMap'][$language] = BBCode::convertForUriId($item['uri-id'], $richbody, BBCode::EXTERNAL);