#23806 [Opn->Fbk]: $GLOBALS array contains an unexpected entry
| From: | sniper@php.net | Date: | Mon, 26 May 2003 01:01:34 +0000 |
| Subject: | #23806 [Opn->Fbk]: $GLOBALS array contains an unexpected entry | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-40402@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: Feedback
Bug Type: Arrays related
Operating System: FreeBSD 4.7
PHP Version: 4.3.2RC4
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[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