Parcourir la source

Fix PHP 7 BC break in Zend_Amf_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 il y a 10 ans
Parent
commit
17f179d52a
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 3 3
      library/Zend/Amf/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;