#19512 [NEW]: PHP 4.2.3 crashes with use of certain variables, unless unset
| From: | v at paid1 dot com | Date: | Fri, 20 Sep 2002 06:03:06 +0000 |
| Subject: | #19512 [NEW]: PHP 4.2.3 crashes with use of certain variables, unless unset | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-19830@lists.php.net to get a copy of this message | ||
From: v@paid1.com
Operating system: Linux
PHP version: 4.2.3
PHP Bug Type: Variables related
Bug description: PHP 4.2.3 crashes with use of certain variables, unless unset
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 bug report at http://bugs.php.net/?id=19512&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=19512&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=19512&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=19512&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=19512&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=19512&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=19512&r=support
Expected behavior: http://bugs.php.net/fix.php?id=19512&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=19512&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=19512&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=19512&r=globals