note 88209 added to security.globals

From: Date: Thu, 15 Jan 2009 13:52:22 +0000
Subject: note 88209 added to security.globals
Groups: php.notes 
Request: Send a blank email to php-notes+get-149255@lists.php.net to get a copy of this message
Beware that all the solutions given in the comments below for emulating register_global being off are bogus, because they can destroy predefined variables you should not unset. For example, suppose that you have <?php $_GET['_COOKIE'] == 'foo'; ?> Then the simplistic solutions of the previous comments let you lose all the cookies registered in the superglobal "$_COOKIE"! (Note that in this situation, even with register_global set to "on", PHP is smart enough to not mess predefined variables such as $_COOKIE.) A proper solution for emulating register_global being off is given in the FAQ, as stated in the documentation above. ---- Server IP: 89.31.146.176 Probable Submitter: 83.189.160.183 ---- Manual Page -- http://www.php.net/manual/en/security.globals.php Edit -- https://master.php.net/note/edit/88209 Del: integrated -- https://master.php.net/note/delete/88209/integrated Del: useless -- https://master.php.net/note/delete/88209/useless Del: bad code -- https://master.php.net/note/delete/88209/bad+code Del: spam -- https://master.php.net/note/delete/88209/spam Del: non-english -- https://master.php.net/note/delete/88209/non-english Del: in docs -- https://master.php.net/note/delete/88209/in+docs Del: other reasons-- https://master.php.net/note/delete/88209 Reject -- https://master.php.net/note/reject/88209 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#149255) next »