Skip to content
This repository has been archived by the owner on May 16, 2018. It is now read-only.

Commit

Permalink
Merge pull request #540 from mhujer/php7-fix-xml-rpc
Browse files Browse the repository at this point in the history
Fix PHP 7 BC breaks in Zend_XmlRpc/Amf_Server
  • Loading branch information
froschdesign committed Mar 31, 2015
2 parents 7cbb1d5 + 17f179d commit 276db36
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions library/Zend/Amf/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -767,9 +767,9 @@ public function setClass($class, $namespace = '', $argv = null)
throw new Zend_Amf_Server_Exception('Invalid method or class; must be a classname or object');
}

$argv = null;
$args = null;
if (2 < func_num_args()) {
$argv = array_slice(func_get_args(), 2);
$args = array_slice(func_get_args(), 2);
}

// Use the class name as the name space by default.
Expand All @@ -780,7 +780,7 @@ public function setClass($class, $namespace = '', $argv = null)

$this->_classAllowed[is_object($class) ? get_class($class) : $class] = true;

$this->_methods[] = Zend_Server_Reflection::reflectClass($class, $argv, $namespace);
$this->_methods[] = Zend_Server_Reflection::reflectClass($class, $args, $namespace);
$this->_buildDispatchTable();

return $this;
Expand Down
8 changes: 4 additions & 4 deletions library/Zend/XmlRpc/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,13 @@ public function setClass($class, $namespace = '', $argv = null)
throw new Zend_XmlRpc_Server_Exception('Invalid method class', 610);
}

$argv = null;
$args = null;
if (2 < func_num_args()) {
$argv = func_get_args();
$argv = array_slice($argv, 2);
$args = func_get_args();
$args = array_slice($args, 2);
}

$dispatchable = Zend_Server_Reflection::reflectClass($class, $argv, $namespace);
$dispatchable = Zend_Server_Reflection::reflectClass($class, $args, $namespace);
foreach ($dispatchable->getMethods() as $reflection) {
$this->_buildSignature($reflection, $class);
}
Expand Down

0 comments on commit 276db36

Please sign in to comment.