ZF-4924: Zend_Amf_Server setClass ignores additional arguments passed as argv


The method setClass($class, $namespace = '', $argv = null) of Zend_Amf_Server ignores the third argument which should be used to pass additional arguments to the later called method.

Current source code Zend/Amf/Server.php line 394: if (3 < func_num_args()) {

Since the number of arguments is equal 3 if additional arguments are passed as $argv the test should be modified to: if (2 < func_num_args()) {


I was able to recreate this issue. The count is 3 in order to add arguments but it is a base zero count so it needs to be 2. 0-1-2 to check that arguments were passed.

I have checked in this issue to the 1.7.0 trunk to close this bug.