note 53586 deleted from ref.session by betz

From: Date: Fri, 08 Jul 2005 08:51:20 +0000
Subject: note 53586 deleted from ref.session by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-91651@lists.php.net to get a copy of this message
Note Submitter: zombie ( ) artattack ( ) to ---- Hi, I have been using PHP sessions for a looooong time and can't believe i have not ran into this. It seems you cannot use numeric keys at the root level of the $_SESSION array. This maybe a security thing of some sorts for the session set/get functions. Who knows. But yes, note the following... <?php $applications_id = 5000; //This does not get set and does not throw an error $_SESSION[$applications_id]['customer_id'] = 123; //This works fine $_SESSION['applications'][$applications_id]['customer_id'] = 123; ?> I am guessing the allowed array keys for the root level are something like the reg exp '/[a-z].*/'. It would be cool if php threw at least a notice if something else was used. Blaine Garrett Webmaster of the art attack http://artattack.to

« previous php.notes (#91651) next »