From 2ddfcd522288c5b52a90858cab378c26769feac3 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Sun, 18 Apr 2021 09:23:14 +0200 Subject: PHP 8 fixes --- Zotlabs/Render/Comanche.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Zotlabs/Render/Comanche.php b/Zotlabs/Render/Comanche.php index cf87cc7d7..5ce05243b 100644 --- a/Zotlabs/Render/Comanche.php +++ b/Zotlabs/Render/Comanche.php @@ -330,6 +330,8 @@ class Comanche { $name = str_replace($mtch[0], '', $name); } } + else + $var = []; if($channel_id) { $m = menu_fetch($name, $channel_id, get_observer_hash()); @@ -408,7 +410,8 @@ class Comanche { } //emit the block - $o .= (($var['wrap'] == 'none') ? '' : '
'); + $wrap = (! x($var, 'wrap') || $var['wrap'] == 'none' ? false : true); + $o .= ($wrap ? '' : '
'); if($r[0]['title'] && trim($r[0]['body']) != '$content') { $o .= '

' . $r[0]['title'] . '

'; @@ -421,7 +424,7 @@ class Comanche { $o .= prepare_text($r[0]['body'], $r[0]['mimetype']); } - $o .= (($var['wrap'] == 'none') ? '' : '
'); + $o .= ($wrap ? '' : '
'); } } -- cgit v1.2.3