From 38b7a7c6607dbfc39f01c94204a36513262c3cc6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 29 May 2015 20:41:52 +0200 Subject: [PATCH] callHook() returns null if no method was found --- inc/inc.ClassControllerCommon.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassControllerCommon.php b/inc/inc.ClassControllerCommon.php index d3a949dff..308872d43 100644 --- a/inc/inc.ClassControllerCommon.php +++ b/inc/inc.ClassControllerCommon.php @@ -115,6 +115,7 @@ class SeedDMS_Controller_Common { function callHook($hook) { /* {{{ */ $tmp = explode('_', get_class($this)); if(isset($GLOBALS['SEEDDMS_HOOKS']['controller'][lcfirst($tmp[2])])) { + $result = null; foreach($GLOBALS['SEEDDMS_HOOKS']['controller'][lcfirst($tmp[2])] as $hookObj) { if (method_exists($hookObj, $hook)) { switch(func_num_args()) { @@ -130,7 +131,7 @@ class SeedDMS_Controller_Common { } } } - return true; + return $result; } return null; } /* }}} */