diff --git a/doc/fix_depricated.php b/doc/fix_depricated.php index a33d9085ca..3be382d768 100755 --- a/doc/fix_depricated.php +++ b/doc/fix_depricated.php @@ -119,6 +119,13 @@ function fix_depricated($file,$replace_file=false) // fix call to not longer existing PDO method $result->fetchSingle() $lines = str_replace('->fetchSingle(','->fetchColumn(',$lines); + + // fix calls to deprecated call_user_method(_array)?(method,object[,args]) + if (preg_match('/call_user_method(_array)?\(/',$lines,$matches)) + { + $lines = preg_replace('/call_user_method\(([^,]+),([^,\)]+)([,)])/','call_user_func(array(\\2,\\1)\\3',$lines); + $lines = preg_replace('/call_user_method_array\(([^,]+),([^,\)]+)([,)])/','call_user_func_array(array(\\2,\\1)\\3',$lines); + } if ($lines != $orig) { diff --git a/phpgwapi/inc/class.schema_proc.inc.php b/phpgwapi/inc/class.schema_proc.inc.php index bb3614cda0..d5ec9ae0fe 100644 --- a/phpgwapi/inc/class.schema_proc.inc.php +++ b/phpgwapi/inc/class.schema_proc.inc.php @@ -858,7 +858,7 @@ class schema_proc $debug_params = func_get_args(); array_shift($debug_params); array_shift($debug_params); - call_user_method_array('debug_message',$this,$debug_params); + call_user_func_array(array($this,'debug_message'),$debug_params); if ($retval < 2 && !$this->dict->debug) { echo '

'.$this->adodb->ErrorMsg()."

\n"; diff --git a/phpgwapi/inc/class.soap_server.inc.php b/phpgwapi/inc/class.soap_server.inc.php index 0861ebe3db..196997a2f9 100644 --- a/phpgwapi/inc/class.soap_server.inc.php +++ b/phpgwapi/inc/class.soap_server.inc.php @@ -193,7 +193,7 @@ { if (is_object($obj)) { - $code = "\$method_response = call_user_method($method,$obj,"; + $code = "\$method_response = call_user_func(array($obj,$method),"; $this->debug("about to call object method '$class\-\>$method' with args"); } else @@ -234,7 +234,7 @@ if (is_object($obj)) { $this->debug("about to call object method '$obj\-\>$method'"); - if(!$method_response = call_user_method($method,$obj)) + if(!$method_response = call_user_func(array($obj,$method))) { $this->make_fault("Server","Method call failed for '$obj->method' with no params"); return $this->fault(); @@ -257,7 +257,7 @@ if($request_data) { /* call method with parameters */ - $code = "\$method_response = call_user_method(\$method,\$obj,"; + $code = "\$method_response = call_user_func(array(\$obj,\$method),"; while(list($x,$y) = each($request_data)) { $code .= "\$request_data[$x]" . ','; @@ -272,7 +272,7 @@ if(is_object($obj)) { $this->debug("about to call object method '$obj\-\>$method'"); - call_user_method($method,$obj); + call_user_func(array($obj,$method)); } else { diff --git a/phpgwapi/inc/class.xml.inc.php b/phpgwapi/inc/class.xml.inc.php index e67033b26a..8a62791908 100644 --- a/phpgwapi/inc/class.xml.inc.php +++ b/phpgwapi/inc/class.xml.inc.php @@ -1346,7 +1346,7 @@ class XML } // Perform an axis action. - $contexts = call_user_method($method, &$this, $axis, $context); + $contexts = call_user_func(array( &$this,$method), $axis, $context); // Check whether there are predicates. if ( count($axis["predicate"]) > 0 ) @@ -1411,7 +1411,7 @@ class XML } // Return the result of the function. - return call_user_method($method, &$this, $node, $arguments); + return call_user_func(array( &$this,$method), $node, $arguments); } /**