note 72505 added to function.array-merge
| From: | lcvalentineatgmaildotcom at osu1 dot php dot net | Date: | Mon, 22 Jan 2007 06:23:00 +0000 |
| Subject: | note 72505 added to function.array-merge | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-122024@lists.php.net to get a copy of this message | ||
I recently upgrade from PHP4 to PHP5. While using PHP4, there was a certain set of information that
we filtered into the $_SESSION global at login. i.e.
$_SESSION = array_merge( $_SESSION, $additional_vals );
This method worked great in PHP4, but not in PHP5. I can only assume the session immediately
invalidated itself.
In fact, my tests to find this bug, led me to find out that all session changes - even those before
this action - were lost.
DO NOT USE array_merge() FROM $_SESSION AND TO $_SESSION
----
Server IP: 64.71.164.2
Probable Submitter: 64.81.96.186
----
Manual Page -- http://www.php.net/manual/en/function.array-merge.php
Edit -- https://master.php.net/note/edit/72505
Del: integrated -- https://master.php.net/note/delete/72505/integrated
Del: useless -- https://master.php.net/note/delete/72505/useless
Del: bad code -- https://master.php.net/note/delete/72505/bad+code
Del: spam -- https://master.php.net/note/delete/72505/spam
Del: non-english -- https://master.php.net/note/delete/72505/non-english
Del: in docs -- https://master.php.net/note/delete/72505/in+docs
Del: other reasons-- https://master.php.net/note/delete/72505
Reject -- https://master.php.net/note/reject/72505
Search -- https://master.php.net/manage/user-notes.php