From a3a7503c0f557f4c570fa23e79992f27d98b8034 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 27 Apr 2008 11:55:11 +0000 Subject: [PATCH] "new static hook methods (class::method) are navitvly supported from php5.2.3+ on, so we need to add some compatibility for our required php5.1 " --- phpgwapi/inc/common_functions.inc.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/phpgwapi/inc/common_functions.inc.php b/phpgwapi/inc/common_functions.inc.php index e42d1ed1a3..3ce9a5ae52 100755 --- a/phpgwapi/inc/common_functions.inc.php +++ b/phpgwapi/inc/common_functions.inc.php @@ -731,6 +731,12 @@ */ function &ExecMethod2($acm) { + // class::method is php5.2.3+ + if (strpos($acm,'::') !== false && version_compare(PHP_VERSION,'5.2.3','<')) + { + list($class,$method) = explode('::',$acm); + $acm = array($class,$method); + } if (!is_callable($acm)) { list($app,$class,$method) = explode('.',$acm); @@ -768,6 +774,13 @@ { /* Need to make sure this is working against a single dimensional object */ $partscount = count(explode('.',$method)) - 1; + + // class::method is php5.2.3+ + if (strpos($method,'::') !== false && version_compare(PHP_VERSION,'5.2.3','<')) + { + list($class,$method) = explode('::',$method); + $method = array($class,$method); + } if (!is_callable($method) && $partscount == 2) { list($appname,$classname,$functionname) = explode(".", $method);