ID: 46561
Updated by: [EMAIL PROTECTED]
Reported By: jian at theorchard dot com
Status: Open
Bug Type: Scripting Engine problem
Operating System: Windows/Linux
PHP Version: 5.2.6
New Comment:
What was fixed in #41685 is that array_push() was not producing
warnings in this case (the fix has added the warning in array_push()).
Previous Comments:
------------------------------------------------------------------------
[2008-11-13 00:27:55] jian at theorchard dot com
Description:
------------
PHP Bugs: #41685 was not fixed in version 5.2.5 and 5.2.6. I was able
to reproduce the problem with this exact code from rob_nicholson at uk
dot ibm dot com's example.
Reproduce code:
---------------
<?
$arr = array();
$arr[0x80000000]=8;
$arr[0x7FFFFFFF]=1;
$arr[]="foo";
?>
Expected result:
----------------
array(3) {
[-2147483648]=>
int(8)
[2147483647]=>
int(1)
[0]=>
string(3) "foo"
}
Actual result:
--------------
PHP Warning: array_push(): Cannot add element to the array as the next
element is already occupied in C:\test.php on line 6
array(2) {
[-2147483648]=>
int(8)
[2147483647]=>
int(1)
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46561&edit=1