From:             [EMAIL PROTECTED]
Operating system: solaris (?) hosted by
PHP version:      4.0.4pl1
PHP Bug Type:     WDDX related
Bug description:  ' crashes wddx_deserialize

$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='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...


Edit Bug report at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to