|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-06-27 09:00 UTC] yohgaki@php.net
-Status: Open
+Status: Feedback
[2013-06-27 09:00 UTC] yohgaki@php.net
[2013-10-15 11:54 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 08:00:01 2025 UTC |
Description: ------------ If a session cookie is not set, a new session id will be created and all works fine. However, if for some reason the session cookie is set, but an empty string, session_start() throws a warning and custom session handlers are called with an empty session id. In addition, no session cookies are set. Test script: --------------- The test script involves setting empty cookies and such. This is the user land workaround I am using for now. if(isset($_COOKIE[ini_get("session.name")]) && empty($_COOKIE[ini_get("session.name")])){ // The cookie is empty. This is bad. unset($_COOKIE[ini_get("session.name")]); } session_start(); Expected result: ---------------- An empty session cookie should be treated the same as an unset session cookie. Actual result: -------------- Empty session cookies are treated as session ids, but warned and cause sessions to not be saved.