From 06d39b077b672c98aaa0ca7bdcd365ed7809920a Mon Sep 17 00:00:00 2001 From: dMetzger Date: Thu, 23 Aug 2012 09:55:58 +0000 Subject: [PATCH] // Fixed hook call in the installer (without shop context) --- classes/Hook.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/classes/Hook.php b/classes/Hook.php index 7a263cdfa..ef58c32c0 100644 --- a/classes/Hook.php +++ b/classes/Hook.php @@ -269,7 +269,8 @@ class HookCore extends ObjectModel // For payment modules, we check that they are available in the contextual country if ($frontend && Validate::isLoadedObject($context->country)) $sql->where('(h.name != "displayPayment" OR (SELECT id_country FROM '._DB_PREFIX_.'module_country mc WHERE mc.id_module = m.id_module AND id_country = '.(int)$context->country->id.' LIMIT 1) = '.(int)$context->country->id.')'); - $sql->where('hm.id_shop = '.(int)$context->shop->id); + if (Validate::isLoadedObject($context->shop)) + $sql->where('hm.id_shop = '.(int)$context->shop->id); if (isset($context->customer) && $context->customer->isLogged()) {