From 0309b6b281edef67582a48831da14909b037557f Mon Sep 17 00:00:00 2001 From: lLefevre Date: Mon, 10 Oct 2011 09:18:11 +0000 Subject: [PATCH] [-][-] FO : not check if Object employee is Load --- classes/shop/Shop.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/shop/Shop.php b/classes/shop/Shop.php index a2745f9c8..d605fffda 100644 --- a/classes/shop/Shop.php +++ b/classes/shop/Shop.php @@ -379,8 +379,8 @@ class ShopCore extends ObjectModel $employee = Context::getContext()->employee; - /* if the profile isn't a superAdmin */ - if ($employee && $employee->id_profile != _PS_ADMIN_PROFILE_) + // If the profile isn't a superAdmin + if (Validate::isLoadedObject($employee) && $employee->id_profile != _PS_ADMIN_PROFILE_) { $select .= ', es.id_employee'; $from .= 'LEFT JOIN '._DB_PREFIX_.'employee_shop es ON es.id_shop = s.id_shop';