Mantis - Quercus
Viewing Issue Advanced Details
512 minor always 12-19-05 05:53 12-30-05 15:21
bago x86  
Windows XP  
normal 3.0.15  
closed  
fixed  
none    
none 3.0.18  
0000512: incorrect handling of default parameters (wrong warning)
A call to a method with default parameters not passed output this warning:
Warning: incorrect number of arguments

The weird things is that the first time the working doesn't appear. After the second reload I start seeing this "wrong" Warning.
function test(param1, param2 = 'default') {
print($param1."=>".$param2);
}

test(param1);

>>> Warning: incorrect number of arguments

Notes
(0000551)
ferg   
12-20-05 14:39   
In the first time Quercus is running in interpreted mode. In the second, it's running in compiled mode, i.e. the bug only exists in compiled mode.