note 88209 deleted from security.globals by cmb
| From: | cmb@php.net | Date: | Sun, 17 Jan 2021 13:57:10 +0000 |
| Subject: | note 88209 deleted from security.globals by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-216184@lists.php.net to get a copy of this message | ||
Note Submitter: claude dot pache at gmail dot com
----
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.