Bug #52754 [NEW]: Array keys in $_SESSION with "!" unsets the whole array in PHP 5.3.3
| From: | dotpointer at gmail dot com | Date: | Tue, 31 Aug 2010 19:47:10 +0000 |
| Subject: | Bug #52754 [NEW]: Array keys in $_SESSION with "!" unsets the whole array in PHP 5.3.3 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-153985@lists.php.net to get a copy of this message | ||
From:
Operating system: Slackware Linux 12
PHP version: 5.3.3
Package: Session related
Bug Type: Bug
Bug description:Array keys in $_SESSION with "!" unsets the whole array in PHP 5.3.3
Description:
------------
Array keys in $_SESSION containing exclamation marks (!) does not seem to
work anymore as of 5.3.3.
Have tried key with different characters like #, " and £ - these worked.
Using "!" in the key seems not only to be unregistered but also to make the
whole $_SESSION to be unset in the next run.
This worked before, as in 5.2.x.
Test script:
---------------
<?
# (as we're talking sessions, this example need to be run 2 times to set
the session data, push F5...)
session_start();
$name = 'hello'; # this does work, uncomment/comment to test
$name = 'hello!'; # this does not, uncomment/comment to test
echo $_SESSION[$name];
$_SESSION[$name] = 'OK';
?>
Expected result:
----------------
That array keys containing exclamation marks ("!") either give a
understandable error or does work as any other key.
Actual result:
--------------
The whole array is being totally empty if a key containing exclamation mark
is entered.
--
Edit bug report at http://bugs.php.net/bug.php?id=52754&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52754&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52754&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52754&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=52754&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52754&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=52754&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=52754&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=52754&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=52754&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=52754&r=support
Expected behavior: http://bugs.php.net/fix.php?id=52754&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=52754&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=52754&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=52754&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52754&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=52754&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=52754&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=52754&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=52754&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=52754&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=52754&r=mysqlcfg