Fix hook for emailcollector

This commit is contained in:
Laurent Destailleur 2022-01-19 02:01:52 +01:00
parent 3eff894da1
commit c469634101
2 changed files with 2 additions and 2 deletions

View File

@ -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';

View File

@ -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'));
}