aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2021-04-18 07:29:41 +0000
committerMax Kostikov <max@kostikov.co>2021-04-18 07:29:41 +0000
commit70b204cb3fcbe48acf28583a193a025e21fa09cc (patch)
tree797db7d17fef736277503483beda7243847f01d0
parent8ab99747f55e60448d4468e99d97ae6c0fa566c0 (diff)
parentd2f1edfad841a186b796e7d468bd1454f6c19f68 (diff)
downloadvolse-hubzilla-70b204cb3fcbe48acf28583a193a025e21fa09cc.tar.gz
volse-hubzilla-70b204cb3fcbe48acf28583a193a025e21fa09cc.tar.bz2
volse-hubzilla-70b204cb3fcbe48acf28583a193a025e21fa09cc.zip
Merge branch 'dev' into 'dev'
PHP 8 fixes See merge request hubzilla/core!1942
-rw-r--r--Zotlabs/Module/Bookmarks.php6
-rw-r--r--Zotlabs/Render/Comanche.php7
-rw-r--r--include/menu.php2
3 files changed, 9 insertions, 6 deletions
diff --git a/Zotlabs/Module/Bookmarks.php b/Zotlabs/Module/Bookmarks.php
index 4b4929c65..822b18308 100644
--- a/Zotlabs/Module/Bookmarks.php
+++ b/Zotlabs/Module/Bookmarks.php
@@ -16,8 +16,8 @@ class Bookmarks extends \Zotlabs\Web\Controller {
nav_set_selected('Bookmarks');
- $item_id = intval($_REQUEST['item']);
- $burl = trim($_REQUEST['burl']);
+ $item_id = (isset($_REQUEST['item']) ? $_REQUEST['item'] : false);
+ $burl = (isset($_REQUEST['burl']) ? trim($_REQUEST['burl']) : '');
if(! $item_id)
return;
@@ -38,7 +38,7 @@ class Bookmarks extends \Zotlabs\Web\Controller {
$item = $i[0];
- $terms = get_terms_oftype($item['term'],TERM_BOOKMARK);
+ $terms = (x($item, 'term') ? get_terms_oftype($item['term'],TERM_BOOKMARK) : false);
if($terms) {
require_once('include/bookmarks.php');
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>');
}
}
diff --git a/include/menu.php b/include/menu.php
index 88863f57b..02b05a36e 100644
--- a/include/menu.php
+++ b/include/menu.php
@@ -111,7 +111,7 @@ function menu_render($menu, $class='', $edit = false, $var = array()) {
$menu['items'][$x]['mitem_desc'] = zidify_links(smilies(bbcode($menu['items'][$x]['mitem_desc'])));
}
- $wrap = (($var['wrap'] === 'none') ? false : true);
+ $wrap = (! x($var, 'wrap') || $var['wrap'] === 'none' ? false : true);
$ret = replace_macros(get_markup_template('usermenu.tpl'),array(
'$menu' => $menu['menu'],