From 216eecbd157745eb28d64d38b094a461c1328131 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Wed, 19 Oct 2016 14:32:09 +0200 Subject: [PATCH] Change the check for null to !empty for userdata in Page class --- www/pages/Page.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/www/pages/Page.php b/www/pages/Page.php index 5fe344e9c..5f5079b31 100644 --- a/www/pages/Page.php +++ b/www/pages/Page.php @@ -45,10 +45,12 @@ class Page extends BasePage $this->smarty->assign('article_menu',$this->smarty->fetch('articlesmenu.tpl')); $category = new Category(['Settings' => $content->pdo]); - if ($this->userdata != null) + if (!empty($this->userdata)) { $parentcatlist = $category->getForMenu($this->userdata["categoryexclusions"]); - else + } + else { $parentcatlist = $category->getForMenu(); + } $this->smarty->assign('parentcatlist',$parentcatlist); $this->smarty->assign('catClass', $category);