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

This commit is contained in:
vAugagneur
2013-01-10 09:31:46 +01:00
parent 195c2c48f8
commit 74774be65e
+2 -2
View File
@@ -50,7 +50,7 @@ class SitemapControllerCore extends FrontController
if(Module::isInstalled('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
$this->context->smarty->assign('display_manufacturer_link', 0);
@@ -58,7 +58,7 @@ class SitemapControllerCore extends FrontController
if(Module::isInstalled('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
$this->context->smarty->assign('display_supplier_link', 0);