From: Janusz Dobrowolski Date: Wed, 24 Nov 2010 17:59:33 +0000 (+0000) Subject: Fixed errors display in included files. X-Git-Tag: v2.4.2~19^2~459 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=2b6fac804f0858c3f191cceaf6237d7f12c7462c;p=fa-stable.git Fixed errors display in included files. --- diff --git a/includes/hooks.inc b/includes/hooks.inc index 102ce7aa..3f769e93 100644 --- a/includes/hooks.inc +++ b/includes/hooks.inc @@ -141,7 +141,8 @@ class hooks { // foreach ($installed_extensions as $ext) { - @include_once($path_to_root.'/'.$ext['path'].'/hooks.php'); + if (file_exists($path_to_root.'/'.$ext['path'].'/hooks.php')) + include_once($path_to_root.'/'.$ext['path'].'/hooks.php'); } /* @@ -247,7 +248,7 @@ function hook_invoke_first($method, &$data, $opts=null) { function hook_invoke_last($method, &$data, $opts=null) { global $Hooks; - + $found = false; foreach($Hooks as $ext => $hook) { if (method_exists($hook, $method)) {