#23806 [Opn->Csd]: $GLOBALS array contains an unexpected entry

From: Date: Mon, 26 May 2003 02:22:38 +0000
Subject: #23806 [Opn->Csd]: $GLOBALS array contains an unexpected entry
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-40406@lists.php.net to get a copy of this message
ID: 23806 Updated by: sniper@php.net Reported By: edawg at e-dawg dot com -Status: Open +Status: Closed Bug Type: Arrays related Operating System: FreeBSD 4.7 PHP Version: 4.3.2RC4 New Comment: So it was the same problem that was already reported, but thanks anyway. :) (the fix will be in PHP 4.3.2) Previous Comments: ------------------------------------------------------------------------ [2003-05-25 20:49:19] edawg at e-dawg dot com Sure enough, it's fixed in that CVS snapshot. ------------------------------------------------------------------------ [2003-05-25 20:01:34] sniper@php.net Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ [2003-05-25 18:37:46] edawg at e-dawg dot com 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 this bug report at http://bugs.php.net/?id=23806&edit=1

« previous php.bugs (#40406) next »