diff --git a/classes/Module.php b/classes/Module.php index 839d217ca..ed6ca2bda 100644 --- a/classes/Module.php +++ b/classes/Module.php @@ -638,8 +638,12 @@ abstract class ModuleCore $exceptions = $moduleInstance->getExceptions((int)$array['id_hook'], (int)$array['id_module']); foreach ($exceptions AS $exception) + { + if (empty($row['value'])) + continue; if (strstr(basename($_SERVER['PHP_SELF']).'?'.$_SERVER['QUERY_STRING'], $exception['file_name'])) continue 2; + } if (is_callable(array($moduleInstance, 'hook'.$hook_name))) { diff --git a/modules/themeinstallator/themeinstallator.php b/modules/themeinstallator/themeinstallator.php index 07276e705..c225c066c 100644 --- a/modules/themeinstallator/themeinstallator.php +++ b/modules/themeinstallator/themeinstallator.php @@ -521,9 +521,10 @@ class ThemeInstallator extends Module INSERT INTO `'._DB_PREFIX_.'hook_module` (`id_module`, `id_hook`, `position`) VALUES ('.(int)$obj->id.', '.(int)Hook::get($hook[$count]).', '.(int)$position[$count].')'); foreach ($exceptions[$count] as $file_name) - Db::getInstance()->Execute(' - INSERT INTO `'._DB_PREFIX_.'hook_module_exceptions` (`id_module`, `id_hook`, `file_name`) - VALUES ('.(int)$obj->id.', '.(int)Hook::get($hook[$count]).', "'.pSQL($file_name).'")'); + if (!empty($filename)) + Db::getInstance()->Execute(' + INSERT INTO `'._DB_PREFIX_.'hook_module_exceptions` (`id_module`, `id_hook`, `file_name`) + VALUES ('.(int)$obj->id.', '.(int)Hook::get($hook[$count]).', "'.pSQL($file_name).'")'); } } }