Fixed errors display in included files.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Wed, 24 Nov 2010 17:59:33 +0000 (17:59 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Wed, 24 Nov 2010 17:59:33 +0000 (17:59 +0000)
includes/hooks.inc

index 102ce7aa380ce2ac85905da93a6f0dfe216b850f..3f769e938d3df14ae18b85336c82ae8c3f570cb0 100644 (file)
@@ -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)) {