#38378 [Com]: wddx_serialize_value geneates no wellformed xml

From: Date: Thu, 17 Aug 2006 13:06:21 +0000
Subject: #38378 [Com]: wddx_serialize_value geneates no wellformed xml
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-100921@lists.php.net to get a copy of this message
 ID:               38378
 Comment by:       hweidner at gmx dot net
 Reported By:      clemens at gutweiler dot net
 Status:           Open
 Bug Type:         WDDX related
 Operating System: Linux
 PHP Version:      4.4.3
 New Comment:

The function wddx_serialize_vars seems also affected:

$array=array("aaa", "bbb", "ccc");
echo wddx_serialize_vars("array");

creates to the broken XML code unter PHP 4.4.3

<wddxPacket version='1.0'><header/><data><struct><var<array
length='3'><string>aaa</string><string>bbb</string><string>ccc</string></array></var></struct></data></wddxPacket>


Previous Comments:
------------------------------------------------------------------------

[2006-08-08 09:57:13] clemens at gutweiler dot net

Description:
------------
wddx_serialize_value generates an invalid wddx package/xml 
string.

in php version 4.4.2 the sample code works, in 4.4.3 not.

Reproduce code:
---------------
<?php
        $array = array(
                'index' => array(
                        1 => 'integer key',
                        'string' => 'string key'
                )
        );
        var_dump( wddx_serialize_value( $array ) );
?>


Expected result:
----------------
/web/cg/playground# /usr/local/php-4.4.2-fastcgi/bin/php 
wddx.php 

string(219) "<wddxPacket version='1.0'><header/
><data><struct><var name='index'><struct><var 
name='1'><string>integer key</string></var><var 
name='string'><string>string key</string></var></struct></
var></struct></data></wddxPacket>"


Actual result:
--------------
/web/cg/playground# /usr/local/php-4.4.3-fastcgi/bin/php 
wddx.php 

string(179) "<wddxPacket version='1.0'><header/
><data><struct><var <struct><string>integer key</string></
var><var n<string>string key</string></var></struct></var></
struct></data></wddxPacket>"



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=38378&edit=1


Thread (5 messages)

« previous php.bugs (#100921) next »