diff --git a/classes/shop/Shop.php b/classes/shop/Shop.php index 86a7bf384..a2745f9c8 100644 --- a/classes/shop/Shop.php +++ b/classes/shop/Shop.php @@ -380,7 +380,7 @@ class ShopCore extends ObjectModel $employee = Context::getContext()->employee; /* if the profile isn't a superAdmin */ - if ($employee->id_profile != _PS_ADMIN_PROFILE_) + if ($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';