diff options
author | Max Kostikov <max@kostikov.co> | 2021-04-18 09:23:14 +0200 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2021-04-18 09:23:14 +0200 |
commit | 2ddfcd522288c5b52a90858cab378c26769feac3 (patch) | |
tree | 3bc5052d5f349737533426fc5c54d128e6a1a80a /Zotlabs/Render/Comanche.php | |
parent | 787ee411ce474887f48a0c3db9c5961ea6fadd8d (diff) | |
download | volse-hubzilla-2ddfcd522288c5b52a90858cab378c26769feac3.tar.gz volse-hubzilla-2ddfcd522288c5b52a90858cab378c26769feac3.tar.bz2 volse-hubzilla-2ddfcd522288c5b52a90858cab378c26769feac3.zip |
PHP 8 fixes
Diffstat (limited to 'Zotlabs/Render/Comanche.php')
-rw-r--r-- | Zotlabs/Render/Comanche.php | 7 |
1 files 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') ? '' : '<div class="' . $class . '">'); + $wrap = (! x($var, 'wrap') || $var['wrap'] == 'none' ? false : true); + $o .= ($wrap ? '' : '<div class="' . $class . '">'); if($r[0]['title'] && trim($r[0]['body']) != '$content') { $o .= '<h3>' . $r[0]['title'] . '</h3>'; @@ -421,7 +424,7 @@ class Comanche { $o .= prepare_text($r[0]['body'], $r[0]['mimetype']); } - $o .= (($var['wrap'] == 'none') ? '' : '</div>'); + $o .= ($wrap ? '' : '</div>'); } } |