X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fhooks.inc;h=393fc8720a96a1d45116931554b76576c25304c4;hb=f2b14f25ac2539890c9ce6fc490c8be80a935b9c;hp=501d4a0f7eb1ca441a103b2d4efc85773e75899d;hpb=5c2b576cebcb6bf59a23d4f49b7362003f8d1bf1;p=fa-stable.git diff --git a/includes/hooks.inc b/includes/hooks.inc index 501d4a0f..393fc872 100644 --- a/includes/hooks.inc +++ b/includes/hooks.inc @@ -235,11 +235,13 @@ function install_hooks() unset($code, $hook_class); } // install hooks provided by active extensions - foreach($installed_extensions as $ext) { - $hook_class = 'hooks_'.$ext['package']; - if ($ext['active'] && class_exists($hook_class)) { - $Hooks[$ext['package']] = new $hook_class; - } + if (isset($installed_extensions) && !empty($installed_extensions)) { + foreach($installed_extensions as $ext) { + $hook_class = 'hooks_'.$ext['package']; + if ($ext['active'] && class_exists($hook_class)) { + $Hooks[$ext['package']] = new $hook_class; + } + } } } /*