From: jian at theorchard dot com
Operating system: Windows/Linux
PHP version: 5.2.6
PHP Bug Type: Arrays related
Bug description: Warning:Cannot add element to the array as the next element
is already occupied
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 bug report at http://bugs.php.net/?id=46561&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=46561&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=46561&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=46561&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=46561&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=46561&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=46561&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=46561&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=46561&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=46561&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=46561&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=46561&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=46561&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=46561&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=46561&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46561&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46561&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=46561&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=46561&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=46561&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=46561&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=46561&r=mysqlcfg