]> git.mxchange.org Git - friendica.git/commitdiff
Avoid problems with an empty body
authorMichael <heluecht@pirati.ca>
Fri, 30 Apr 2021 04:45:31 +0000 (04:45 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 30 Apr 2021 04:45:31 +0000 (04:45 +0000)
src/Model/Item.php

index 9fa657a69fafded55b92ffdc3054240727d6198d..d842f2284f3c575746159d6f96dcb090b94eb2b8 100644 (file)
@@ -2640,7 +2640,7 @@ class Item
                        unset($hook_data);
                }
 
-               $body = $item['body'];
+               $body = $item['body'] ?? '';
                $item['body'] = preg_replace("/\s*\[attachment .*?\].*?\[\/attachment\]\s*/ism", '', $item['body']);
                self::putInCache($item);
                $item['body'] = $body;