#38642 [NEW]: array_merge and $_SESSION do not play well

From: Date: Tue, 29 Aug 2006 14:17:30 +0000
Subject: #38642 [NEW]: array_merge and $_SESSION do not play well
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-101496@lists.php.net to get a copy of this message
From: sp0n9e at gmail dot com Operating system: Windows PHP version: 5.2.0RC2 PHP Bug Type: Session related Bug description: array_merge and $_SESSION do not play well Description: ------------ On linux, this code runs perfectly fine and as expected, on windows, it seems that session_write is not called at all or given null params. Reproduce code: --------------- <?php session_set_save_handler('var_dump','var_dump','var_dump','var_dump','var_dump','var_dump'); session_start(); $_SESSION['foo'] = "bar"; $_SESSION = array_merge($_SESSION,array('foo'=>'foo','bar'=>'bar')); session_write_close(); var_dump($_SESSION); ?> Expected result: ---------------- Warning: Wrong parameter count for var_dump (i believe triggered by session_close callback) and a dump of the session id and serialized session data. On both the expected and non-expected results, var_dump shows the expected array structure. Actual result: -------------- 1 wrong parameter count for var_dump given by the session close callback, and nothing else concerning session write callback. However, the var_dump of $_SESSION shows the correct array structure. -- Edit bug report at http://bugs.php.net/?id=38642&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38642&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38642&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38642&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38642&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38642&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38642&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38642&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38642&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38642&r=support Expected behavior: http://bugs.php.net/fix.php?id=38642&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38642&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38642&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38642&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38642&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38642&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38642&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38642&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38642&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38642&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38642&r=mysqlcfg

« previous php.bugs (#101496) next »