From c46963410138ca70271fefa41d90ee31834510a9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 19 Jan 2022 02:01:52 +0100 Subject: [PATCH] Fix hook for emailcollector --- htdocs/core/class/hookmanager.class.php | 2 +- htdocs/emailcollector/class/emailcollector.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index d1b1e08710e..a40ec3e30c3 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -111,7 +111,7 @@ class HookManager if (in_array($context, $arrayhooks) || in_array('all', $arrayhooks)) { // We instantiate action class only if initialized hook is handled by module // Include actions class overwriting hooks - if (empty($this->hooks[$context][$module]) || !is_object($this->hooks[$context][$module])) { // If set to an object value, class was already loaded + if (empty($this->hooks[$context][$module]) || !is_object($this->hooks[$context][$module])) { // If set to an object value, class was already loaded so we do nothing. $path = '/'.$module.'/class/'; $actionfile = 'actions_'.$module.'.class.php'; diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 913b7b08a55..ff29e56b1e7 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -2365,7 +2365,7 @@ class EmailCollector extends CommonObject // this code action is hook..... for support this call global $hookmanager; - if (!is_object($hookmanager)) { + if (is_object($hookmanager)) { $hookmanager->initHooks(array('emailcollectorcard')); }