From ba1e705c6154d347000ab6c92ef59f7f6f60e886 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 8 Mar 2024 10:28:48 +0000 Subject: passing null to mb_strlen() is deprecated --- Zotlabs/Lib/Libzot.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Lib/Libzot.php') diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php index 942c3082a..3495ede06 100644 --- a/Zotlabs/Lib/Libzot.php +++ b/Zotlabs/Lib/Libzot.php @@ -1890,12 +1890,12 @@ class Libzot { $maxlen = get_max_import_size(); - if ($maxlen && mb_strlen($arr['body']) > $maxlen) { + if ($maxlen && isset($arr['body']) && mb_strlen($arr['body']) > $maxlen) { $arr['body'] = mb_substr($arr['body'], 0, $maxlen, 'UTF-8'); logger('message length exceeds max_import_size: truncated'); } - if ($maxlen && mb_strlen($arr['summary']) > $maxlen) { + if ($maxlen && isset($arr['summary']) && mb_strlen($arr['summary']) > $maxlen) { $arr['summary'] = mb_substr($arr['summary'], 0, $maxlen, 'UTF-8'); logger('message summary length exceeds max_import_size: truncated'); } -- cgit v1.2.3