[-] FO : fixed bug #PSCFV-5569 - Trying to get property of non-object in SitemapController

This commit is contained in:
vAugagneur committed 2013-01-10 09:31:46 +01:00
1 parent 2fad90640d
commit 6e3c743948
1 file changed
+2 -2
+2 -2
View File
@@ -50,7 +50,7 @@ class SitemapControllerCore extends FrontController
if(Module::isInstalled('blockmanufacturer')) if(Module::isInstalled('blockmanufacturer'))
{ {
$blockmanufacturer = Module::getInstanceByName('blockmanufacturer'); $blockmanufacturer = Module::getInstanceByName('blockmanufacturer');
$this->context->smarty->assign('display_manufacturer_link', (bool)$blockmanufacturer->active); $this->context->smarty->assign('display_manufacturer_link', isset($blockmanufacturer->active) ? (bool)$blockmanufacturer->active : false);
} }
else else
$this->context->smarty->assign('display_manufacturer_link', 0); $this->context->smarty->assign('display_manufacturer_link', 0);
@@ -58,7 +58,7 @@ class SitemapControllerCore extends FrontController
if(Module::isInstalled('blocksupplier')) if(Module::isInstalled('blocksupplier'))
{ {
$blocksupplier = Module::getInstanceByName('blocksupplier'); $blocksupplier = Module::getInstanceByName('blocksupplier');
$this->context->smarty->assign('display_supplier_link', (bool)$blocksupplier->active); $this->context->smarty->assign('display_supplier_link', isset($blocksupplier->active) ? (bool)$blocksupplier->active : false);
} }
else else
$this->context->smarty->assign('display_supplier_link', 0); $this->context->smarty->assign('display_supplier_link', 0);