#19512 [Opn->Fbk]: PHP 4.2.3 crashes with use of certain variables, unless unset
| From: | sander@php.net | Date: | Fri, 20 Sep 2002 07:45:12 +0000 |
| Subject: | #19512 [Opn->Fbk]: PHP 4.2.3 crashes with use of certain variables, unless unset | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-19840@lists.php.net to get a copy of this message | ||
ID: 19512
Updated by: sander@php.net
Reported By: v@paid1.com
-Status: Open
+Status: Feedback
Bug Type: Variables related
Operating System: Linux
PHP Version: 4.2.3
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2002-09-20 01:03:06] v@paid1.com
Here is the code that crashes:
global $HTTP_COOKIE_VARS;
$cvar=$HTTP_COOKIE_VARS["user_name"];
...so far, everything works OK. But after some more code that uses
$cvar, like: if (empty($cvar)), etc, PHP crashes and I get Page Not
found!
I was able to fix this, by simply adding unset() like this:
global $HTTP_COOKIE_VARS;
$cvar=$HTTP_COOKIE_VARS["user_name"];
unset($HTTP_COOKIE_VARS["user_name"]);
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19512&edit=1