note 107874 deleted from session.examples.basic by danbrown
| From: | danbrown@php.net | Date: | Thu, 10 May 2012 18:14:06 +0000 |
| Subject: | note 107874 deleted from session.examples.basic by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-187739@lists.php.net to get a copy of this message | ||
Note Submitter: Ray dot Paseur at Gmail dot com
----
To add to the sagacious comment from anonymous at #107788, the $_SESSION array should be immutable
until after session_start() has been executed successfully. But it is not. PHP will silently allow
the script to put information into the "session" array even when the session has not been
started. This is a source of frequent confusion, such as when a programmer accidentally omits
session_start() or places session_start() inside a conditional logic structure.