#26278 [NEW]: Can not user integer variable in $_SESSION
| From: | glumtail at yahoo dot com | Date: | Mon, 17 Nov 2003 01:01:32 +0000 |
| Subject: | #26278 [NEW]: Can not user integer variable in $_SESSION | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-50456@lists.php.net to get a copy of this message | ||
From: glumtail at yahoo dot com
Operating system: FreeBSD
PHP version: 4.3.2
PHP Bug Type: Session related
Bug description: Can not user integer variable in $_SESSION
Description:
------------
I found it can not save integer variable in session.
e.g:
$_SESSION['TEST'] = 'SOMETHING' // OK
$_SESSION[1] = 'SOMETHING' // ERROR
My environment: FreeBSD + PHP 4.3.2
I think it must be a BIG bug.
Reproduce code:
---------------
<?php
session_start();
print_r($_SESSION); // always can not print $_SESSION[1]
$_SESSION[1] = 'TEST';
$_SESSION['TEST'] = 'MY TEST';
print_r($_SESSION);
?>
Expected result:
----------------
Result (after refresh):
Array ( )
Array ( [1] => TEST [TEST] => MY TEST )
The correct result should be:
Array ( [1] => TEST [TEST] => MY TEST )
Array ( [1] => TEST [TEST] => MY TEST )
--
Edit bug report at http://bugs.php.net/?id=26278&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26278&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26278&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26278&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26278&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26278&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=26278&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26278&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26278&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26278&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26278&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26278&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26278&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26278&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26278&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26278&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26278&r=float