#23806 [NEW]: $GLOBALS array contains an unexpected entry

From: Date: Sun, 25 May 2003 23:37:46 +0000
Subject: #23806 [NEW]: $GLOBALS array contains an unexpected entry
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-40401@lists.php.net to get a copy of this message
From: edawg at e-dawg dot com Operating system: FreeBSD 4.7 PHP version: 4.3.2RC4 PHP Bug Type: Arrays related Bug description: $GLOBALS array contains an unexpected entry A key in the $GLOBALS array contains what appears to be the result of serializing an array. I have fixed the problem in the code with a regexp, but I don't think it's supposed to be there. Code to show this: $global_keys = array_keys($GLOBALS); foreach ($global_keys as $key) { echo $key . ' - ' . $GLOBALS[$key] . '<br>'; } On a very simple page this results in nothing but the expected variables. However, on a large and complex page I get this among the results: ;s:6:"weight";d:0;};s:6:"weight";d:0;}language - I'm going to take a wild stab that it's adding the result of serialization of some variable into the array keys with no value rather than adding the key and the serialized value. The same function worked flawlessly without the regexp in PHP 4.3.1 with the exact same configuration. -- Edit bug report at http://bugs.php.net/?id=23806&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23806&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23806&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23806&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23806&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23806&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=23806&r=support Expected behavior: http://bugs.php.net/fix.php?id=23806&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=23806&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=23806&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23806&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23806&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23806&r=dst IIS Stability: http://bugs.php.net/fix.php?id=23806&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=23806&r=gnused

« previous php.bugs (#40401) next »