aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-02-11 09:36:17 +0000
committerMario <mario@mariovavti.com>2022-02-11 09:36:17 +0000
commit9e9d96a2eca57143f8f13b3fb092ac9359d40bec (patch)
tree0020af35c6e14f7ed685b8837aecff5b40346594 /Zotlabs
parent615c9f1cbe2ccf9c33b035bcf04c5bc6bf64c7ed (diff)
downloadvolse-hubzilla-9e9d96a2eca57143f8f13b3fb092ac9359d40bec.tar.gz
volse-hubzilla-9e9d96a2eca57143f8f13b3fb092ac9359d40bec.tar.bz2
volse-hubzilla-9e9d96a2eca57143f8f13b3fb092ac9359d40bec.zip
minor restructure to omit php 8.1 deprecation warning
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Widget/Messages.php13
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: