From 8f7543bd47eaa2543622b57b8542b4eb47fc68a3 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) git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16963 b9a71923-0436-4b27-9f14-aed3839534dd --- 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()) {