From:             leonardo dot celis at ohstudio dot com dot ar
Operating system: Windows XP
PHP version:      5.2.3
PHP Bug Type:     Session related
Bug description:  Bug when php try to serialize a array with a number for key

Description:
------------
start.php: here the value is serialize, but php take the value from memory
and show it.

show.php: here the value is take from the session file and try to
unserialize. The session file have 0 bytes. Therefor the value is no show.

However this script works:
<?
$var['1'] = "Hola mundo";
$x = unserialize(serialize($var));
echo serialize($var) . "<br>";
print_r($x);
?>

This bug I've founded with my partner Mario GarcĂ­a.




Reproduce code:
---------------
start.php
<?
session_start();
$_SESSION['1'] = "Hola mundo";
print_r($_SESSION);
?>

show.php
<?
session_start();
print_r($_SESSION);
?>

Expected result:
----------------
Array ( [1] => Hola mundo )

Actual result:
--------------
Array (  )

-- 
Edit bug report at http://bugs.php.net/?id=41854&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=41854&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=41854&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=41854&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=41854&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=41854&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=41854&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=41854&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=41854&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=41854&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=41854&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=41854&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=41854&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=41854&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41854&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=41854&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=41854&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=41854&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41854&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=41854&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=41854&r=mysqlcfg

Reply via email to