|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-07-09 15:25 UTC] seitenzahl at hotmail dot com
[2006-07-09 17:14 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 22:00:01 2025 UTC |
Description: ------------ After doing something like $oldsessiondata = $_SESSION; the changes to $_SESSION won't be committed to the session itself anymore. I don't think $_SESSION should lose its magic properties in this case. Reproduce code: --------------- <?php session_start(); $_SESSION['testbefore'] = 'foobefore'; print_r($_SESSION); $oldsessiondata = $_SESSION; print_r($_SESSION); $_SESSION['test'] = 'foo'; print_r($_SESSION); ?> Expected result: ---------------- Array ( [testbefore] => foobefore ) Array ( [testbefore] => foobefore ) Array ( [testbefore] => foobefore [test] => foo ) After reload: Array ( [testbefore] => foobefore [test] => foo ) Array ( [testbefore] => foobefore [test] => foo ) Array ( [testbefore] => foobefore [test] => foo ) Actual result: -------------- Array ( [testbefore] => foobefore ) Array ( [testbefore] => foobefore ) Array ( [testbefore] => foobefore [test] => foo ) After reload: Array ( [testbefore] => foobefore ) Array ( [testbefore] => foobefore ) Array ( [testbefore] => foobefore [test] => foo )