From 75a90f5e5dcc019c131bb63d4c6cb43c0a4042f1 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 30 Apr 2021 04:45:31 +0000 Subject: [PATCH] Avoid problems with an empty body --- src/Model/Item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 9fa657a69..d842f2284 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -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;