Просмотр исходного кода

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

Fix PHP 7 BC breaks in Zend_XmlRpc/Amf_Server
Frank Brückner 10 лет назад
Родитель
Сommit
276db360bb
2 измененных файлов с 7 добавлено и 7 удалено
  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');
             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()) {
         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.
         // 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->_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();
         $this->_buildDispatchTable();
 
 
         return $this;
         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);
             throw new Zend_XmlRpc_Server_Exception('Invalid method class', 610);
         }
         }
 
 
-        $argv = null;
+        $args = null;
         if (2 < func_num_args()) {
         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) {
         foreach ($dispatchable->getMethods() as $reflection) {
             $this->_buildSignature($reflection, $class);
             $this->_buildSignature($reflection, $class);
         }
         }