Selaa lähdekoodia

Merge pull request #540 from mhujer/php7-fix-xml-rpc

Fix PHP 7 BC breaks in Zend_XmlRpc/Amf_Server
Frank Brückner 10 vuotta sitten
vanhempi
commit
276db360bb
2 muutettua tiedostoa jossa 7 lisäystä ja 7 poistoa
  1. 3 3
      library/Zend/Amf/Server.php
  2. 4 4
      library/Zend/XmlRpc/Server.php

+ 3 - 3
library/Zend/Amf/Server.php

@@ -767,9 +767,9 @@ class Zend_Amf_Server implements Zend_Server_Interface
             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.
@@ -780,7 +780,7 @@ class Zend_Amf_Server implements Zend_Server_Interface
 
         $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;

+ 4 - 4
library/Zend/XmlRpc/Server.php

@@ -278,13 +278,13 @@ class Zend_XmlRpc_Server extends Zend_Server_Abstract
             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);
         }