"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

"
This commit is contained in:
Ralf Becker 2008-04-27 11:55:11 +00:00
parent afb99a49e9
commit a3a7503c0f

View File

@ -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);