#38642 [Opn->Bgs]: array_merge and $_SESSION do not play well
| From: | tony2001@php.net | Date: | Wed, 29 Nov 2006 22:06:11 +0000 |
| Subject: | #38642 [Opn->Bgs]: array_merge and $_SESSION do not play well | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-105674@lists.php.net to get a copy of this message | ||
ID: 38642
Updated by: tony2001@php.net
Reported By: sp0n9e at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Session related
Operating System: Windows
PHP Version: 5.2.0RC2
New Comment:
See bug #39496.
Previous Comments:
------------------------------------------------------------------------
[2006-08-29 14:17:30] sp0n9e at gmail dot com
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 this bug report at http://bugs.php.net/?id=38642&edit=1