Mantis - Quercus
Viewing Issue Advanced Details
4142 tweak always 07-26-10 18:35 07-26-10 18:35
is  
 
normal  
new 4.0.9  
open  
none    
none  
0004142: array_search is not work correctly when array and object element mixed in the array.
<?
$c = new stdClass();
$andy = array('1', '2', '3');
$andy2 = array();

$andy2[0] = $andy;

$key = array_search($andy, $andy2, false);
print("B:");
print($key);
print("\n");

$key = array_search($c, $andy2, true);
print("A:");
print($key);
print("\n");

print("C:");
print($c);
print("\n");
print($andy);
print("\n");
print($andy2);
print("\n");
?>
--
When an ObjectExtValue(stdClass) is compared with ArrayValue(Array). it will cause a error raise in array_search.


There are no notes attached to this issue.