|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-11-03 22:05 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
[2016-11-03 22:05 UTC] requinix@php.net
[2016-11-04 11:12 UTC] sasf54 at gmail dot com
[2016-11-04 11:37 UTC] sasf54 at gmail dot com
[2016-11-05 01:21 UTC] yohgaki@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 21:00:01 2025 UTC |
Description: ------------ I have a shopping cart. With unlogged in user, I cannot clean it. (unset($_SESSION['order']); session_commit();) But with a logged in user, it works fine. (it has some other session variables) I fixed the bug, with issuing an other session_start() right before the unset block. Test script: --------------- // I cannot give you the whole code part :( // I set the $_SESSION['order'] in an other php file, and it's working fine session_start(); // some long processing codeing if (isset($_SESSION['order'])) { session_start(); // <=== this has to be here to work, without it, does not works unset($_SESSION['order']); session_commit(); } Expected result: ---------------- the $_SESSION['order'] to be unset (For unlogged in user, it should be an empty session, for a logged in user, it works fine 'o,O' ) Actual result: -------------- It should clear the $_SESSION['order'] for unlogged in users too. (I also tried to add some new values to other session variables to save it, but it was not working :( )