Avoid problems with an empty body

This commit is contained in:
Michael 2021-04-30 04:45:31 +00:00
parent 795761ee89
commit 75a90f5e5d

View 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;