Bug #10494 Updated: ' crashes wddx_deserialize
| From: | andrei@php.net | Date: | Wed, 25 Apr 2001 19:14:07 +0000 |
| Subject: | Bug #10494 Updated: ' crashes wddx_deserialize | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-52422@lists.php.net to get a copy of this message | ||
ID: 10494
Updated by: andrei
Reported By: gin@gintonyx.de
Old-Status: Open
Status: Assigned
Bug Type: WDDX related
PHP Version: 4.0.4pl1
Assigned To: andrei
Comments:
Previous Comments:
---------------------------------------------------------------------------
[2001-04-25 13:49:29] gin@gintonyx.de
<?
$arr = array("hello"=>"there", "i'm" => 30);
foreach ($arr as $name => $value)
echo("name: $name, value: $value<br>n");
$packet = wddx_serialize_vars("arr");
echo(htmlentities($packet) . "<br>n");
$newarr = wddx_deserialize($packet);
echo("newarr: $newarr<br>n");
foreach ($newarr["arr"] as $name => $value)
echo("name: $name, value: $value<br>n");
?>
result is this:
> name: hello, value: there
> name: i'm, value: 30
> <wddxPacket version='1.0'><header/><data><struct><var
> name='arr'><struct><var >
> name='hello'><string>there</string></var><var
>
> name='i'm'><number>30</number></var></struct></var></struct></data></wddxPacket>
> newarr:
>
> Result:
> Warning: Invalid argument supplied for foreach() in whatever.php on line 12
Changing 'i'm' on line 2 to 'i am' solves the "crash".
Maybe the ' char should have to be mapped to ' or something else... I dunno. Just wanted
to let you know...
PHP ROCKS!
-Gin
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10494&edit=2