#44545 [Opn]: Numeric keys in sessions fail silently
| From: | ike at concept47 dot com | Date: | Thu, 27 Mar 2008 10:43:11 +0000 |
| Subject: | #44545 [Opn]: Numeric keys in sessions fail silently | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-123696@lists.php.net to get a copy of this message | ||
ID: 44545
User updated by: ike at concept47 dot com
Reported By: ike at concept47 dot com
Status: Open
Bug Type: Session related
Operating System: Windows Xp sp2
PHP Version: 5.2.5
New Comment:
changing email address.
Previous Comments:
------------------------------------------------------------------------
[2008-03-27 10:42:02] ike at concept47 dot com
Description:
------------
trying to use numeric keys for sessions vars, fails, silently. This is
bad and can lead to lost hours/money for developer. I am just asking for
this sort of assignment to fail in a far more obvious manner.
Reproduce code:
---------------
$_SESSION['1234'] = "boooo!"
Expected result:
----------------
I expect the session variable to be stored or else fail miserably like
this assignment would
$123 = "dummy!"
Actual result:
--------------
the session variable with a numeric key is never stored ... and it
might take a developer a while to figure out why, as other session vars
are stored just fine.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44545&edit=1