ID: 44721
Updated by: [EMAIL PROTECTED]
Reported By: antphill at uk dot ibm dot com
-Status: Open
+Status: Bogus
Bug Type: Session related
Operating System: Windows XP and Linux
PHP Version: 5.2.6RC5
New Comment:
RTFM.
Previous Comments:
------------------------------------------------------------------------
[2008-04-14 16:09:00] antphill at uk dot ibm dot com
Description:
------------
If I call session_register with a string key that is in fact an
integer, then it creates an entry in $_SESSION that is inaccessible
using array indexes by a script. I think this is because the extension
is adding the key to the array directly rather than using the hash APIs
that convert string keys to integers where possible.
Reproduce code:
---------------
<?php
session_start();
session_register("123");
var_dump($_SESSION);
var_dump($_SESSION["123"]);
var_dump($_SESSION[123]);
?>
Actual result:
--------------
array(1) {
["123"]=>
NULL
}
Notice: Undefined index: 123 in D:\ant.php on line 5
NULL
Notice: Undefined offset: 123 in D:\ant.php on line 6
NULL
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44721&edit=1