diff --git a/classes/Hook.php b/classes/Hook.php index 256c88cb1..6159c55b7 100644 --- a/classes/Hook.php +++ b/classes/Hook.php @@ -376,7 +376,7 @@ class HookCore extends ObjectModel $exceptions = $moduleInstance->getExceptions($array['id_hook']); if (in_array(Dispatcher::getInstance()->getController(), $exceptions)) continue; - if (isset($context->employee) && !$moduleInstance->getPermission('view', $context->employee)) + if (Validate::isLoadedObject($context->employee) && !$moduleInstance->getPermission('view', $context->employee)) continue; // Check which / if method is callable