diff options
author | Mario <mario@mariovavti.com> | 2022-02-11 09:36:17 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-02-11 09:36:17 +0000 |
commit | 9e9d96a2eca57143f8f13b3fb092ac9359d40bec (patch) | |
tree | 0020af35c6e14f7ed685b8837aecff5b40346594 | |
parent | 615c9f1cbe2ccf9c33b035bcf04c5bc6bf64c7ed (diff) | |
download | volse-hubzilla-9e9d96a2eca57143f8f13b3fb092ac9359d40bec.tar.gz volse-hubzilla-9e9d96a2eca57143f8f13b3fb092ac9359d40bec.tar.bz2 volse-hubzilla-9e9d96a2eca57143f8f13b3fb092ac9359d40bec.zip |
minor restructure to omit php 8.1 deprecation warning
-rw-r--r-- | Zotlabs/Widget/Messages.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Zotlabs/Widget/Messages.php b/Zotlabs/Widget/Messages.php index 71f4bd310..89533697f 100644 --- a/Zotlabs/Widget/Messages.php +++ b/Zotlabs/Widget/Messages.php @@ -103,13 +103,20 @@ class Messages { if (!$summary) { $summary = $item['summary']; } + if (!$summary) { - $summary = htmlentities(html2plain(bbcode($item['body'], ['drop_media' => true]), 75, true), ENT_QUOTES, 'UTF-8', false); + $summary = html2plain(bbcode($item['body'], ['drop_media' => true]), 75, true); + if ($summary) { + $summary = htmlentities($summary, ENT_QUOTES, 'UTF-8', false); + } } - if (!$summary) { + + if (!$summary) $summary = '...'; } - $summary = substr_words($summary, 68); + else { + $summary = substr_words($summary, 68); + } switch(intval($item['item_private'])) { case 1: |