Re: Re: unset($_SESSION[...]) vs. register_globals=On
| From: | Hans Spath | Date: | Thu, 28 Feb 2002 07:13:16 +0000 |
| Subject: | Re: Re: unset($_SESSION[...]) vs. register_globals=On | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-80498@lists.php.net to get a copy of this message | ||
Yasuo Ohgaki wrote:
Hans Spath wrote:Then it should be changed in the documentation (ref.session....) where it says don't use session_unregister($var) (Caution block), use unset($_SESSION[$var]) (Example 3). - Hans SpathWhen register_globals is enabled, you can't unregister session variables via unset($_SESSION['varname']). How are php coders supposed to write clean code with that new autoglobal variable, when they have to have the same configuration at every server they run their scripts? I've written a bug report (#15551) which was classified as 'Bogus'. I don't think ignoring that problem is a good solution, so please review that bug report. Thanks. - Hans SpathUse session_unset(). It does not create any inconsistency, not like session_register(), etc.