Browse Source

Fix PHP 7 BC break in Zend_XmlRpc_Server

The func_get_arg() and func_get_args() functions will no longer return the
 original value that was passed to a parameter and will instead provide the
 current value (which might have been modified).

(from https://github.com/php/php-src/blob/master/UPGRADING)
Martin Hujer 10 năm trước cách đây
mục cha
commit
724719a049
1 tập tin đã thay đổi với 4 bổ sung4 xóa
  1. 4 4
      library/Zend/XmlRpc/Server.php

+ 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);
         }