<?xml version="1.0"?>
<?xml-stylesheet
href="http://www.w3.org/2000/08/w3c-synd/style.css" type="text/css"
?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel rdf:about="http://pear.php.net/bugs/search.php">
    <title>PEAR Bug Search Results</title>
    <link>http://pear.php.net/bugs/search.php?cmd=display&amp;package_name%5B0%5D=XML_Serializer</link>
    <description>Search Results</description>
    <dc:language>en-us</dc:language>
    <dc:creator>pear-webmaster@lists.php.net</dc:creator>
    <dc:publisher>pear-webmaster@lists.php.net</dc:publisher>
    <admin:generatorAgent rdf:resource="http://pear.php.net/bugs"/>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
    <items>
     <rdf:Seq>
      <rdf:li rdf:resource="http://pear.php.net/bug/16618" />
      <rdf:li rdf:resource="http://pear.php.net/bug/16588" />
      <rdf:li rdf:resource="http://pear.php.net/bug/16586" />
      <rdf:li rdf:resource="http://pear.php.net/bug/16402" />
      <rdf:li rdf:resource="http://pear.php.net/bug/16204" />
      <rdf:li rdf:resource="http://pear.php.net/bug/16153" />
      <rdf:li rdf:resource="http://pear.php.net/bug/15670" />
      <rdf:li rdf:resource="http://pear.php.net/bug/14112" />

     </rdf:Seq>
    </items>
  </channel>

  <image rdf:about="http://pear.php.net/gifs/pearsmall.gif">
    <title>PEAR Bugs</title>
    <url>http://pear.php.net/gifs/pearsmall.gif</url>
    <link>http://pear.php.net/bugs</link>
  </image>

    <item rdf:about="http://pear.php.net/bug/16618">
      <title>XML_Serializer: Bug 16618 [Open] Fench chars are scrambled after Unserialize</title>
      <link>http://pear.php.net/bugs/16618</link>
      <content:encoded><![CDATA[<pre>XML_Serializer Bug
Reported by galiganu
2009-09-16T15:30:57+00:00
PHP: Irrelevant OS: Irrelevant Package Version: 0.20.0

Description:
------------
Hi

I have exported data from a database in a xml file. Data contains also french text.
After Unserialize, accent chars are scrambled.

Test script:
---------------
$unserializer = &amp;new XML_UNserializer(array('complexType' =&gt; 'array',
                                                              'parseAttributes' =&gt; true,
                                                              'whitespace' =&gt; XML_UNSERIALIZER_WHITESPACE_KEEP,
                                                              'guessTypes' =&gt; false));

$result = $unserializer-&gt;unserialize($xml_file, true);

if ($result === true)
{
    echo $this-&gt;unserializer-&gt;getUnserializedData();
}

$xml_file contains:
-------------------------------
&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot; ?&gt;
&lt;items&gt;
    &lt;item&gt;TÃ©lÃ©phonie rÃ©sidentielle&lt;/item&gt;
&lt;/items&gt;



Expected result:
----------------
TÃ©lÃ©phonie rÃ©sidentielle

Actual result:
--------------
TÃÂ©lÃÂ©phonie rÃÂ©sidentielle</pre>]]></content:encoded>
      <description><![CDATA[<pre>XML_Serializer Bug
Reported by galiganu
2009-09-16T15:30:57+00:00
PHP: Irrelevant OS: Irrelevant Package Version: 0.20.0

Description:
------------
Hi

I have exported data from a database in a xml file. Data contains also french text.
After Unserialize, accent chars are scrambled.

Test script:
---------------
$unserializer = &amp;new XML_UNserializer(array('complexType' =&gt; 'array',
                                                              'parseAttributes' =&gt; true,
                                                              'whitespace' =&gt; XML_UNSERIALIZER_WHITESPACE_KEEP,
                                                              'guessTypes' =&gt; false));

$result = $unserializer-&gt;unserialize($xml_file, true);

if ($result === true)
{
    echo $this-&gt;unserializer-&gt;getUnserializedData();
}

$xml_file contains:
-------------------------------
&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot; ?&gt;
&lt;items&gt;
    &lt;item&gt;TÃ©lÃ©phonie rÃ©sidentielle&lt;/item&gt;
&lt;/items&gt;



Expected result:
----------------
TÃ©lÃ©phonie rÃ©sidentielle

Actual result:
--------------
TÃÂ©lÃÂ©phonie rÃÂ©sidentielle</pre>]]></description>
      <dc:date>2009-09-16T15:30:57+00:00</dc:date>
      <dc:creator>ionut &amp;#x64;&amp;#111;&amp;#x74; aivanesei &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>XML_Serializer Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/16588">
      <title>XML_Serializer: Feature/Change Request 16588 [Open] XSD schema support</title>
      <link>http://pear.php.net/bugs/16588</link>
      <content:encoded><![CDATA[<pre>XML_Serializer Feature/Change Request
Reported by moiseev
2009-09-10T10:09:17+00:00
PHP: Irrelevant OS: Irrelevant Package Version: 0.20.0

Description:
------------
I'd like to request the XSD schema support by the XML_Serializer class.
It is frequently needed to validate the xml versus the corresponding scheme!

Is there any plans to implement it?

PS. The only one workaround I found. It is to use DOMDocument class via the method schemaValidate, but it would be great to have it with one instance of Serilizer! 
See the link: http://us3.php.net/manual/en/class.domdocument.php</pre>]]></content:encoded>
      <description><![CDATA[<pre>XML_Serializer Feature/Change Request
Reported by moiseev
2009-09-10T10:09:17+00:00
PHP: Irrelevant OS: Irrelevant Package Version: 0.20.0

Description:
------------
I'd like to request the XSD schema support by the XML_Serializer class.
It is frequently needed to validate the xml versus the corresponding scheme!

Is there any plans to implement it?

PS. The only one workaround I found. It is to use DOMDocument class via the method schemaValidate, but it would be great to have it with one instance of Serilizer! 
See the link: http://us3.php.net/manual/en/class.domdocument.php</pre>]]></description>
      <dc:date>2009-09-10T10:09:17+00:00</dc:date>
      <dc:creator>moiseev &amp;#x64;&amp;#111;&amp;#x74; igor &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>XML_Serializer Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/16586">
      <title>XML_Serializer: Bug 16586 [Open] namespace duplication</title>
      <link>http://pear.php.net/bugs/16586</link>
      <content:encoded><![CDATA[<pre>XML_Serializer Bug
Reported by davidmclaughlin
2009-09-09T18:04:29+00:00
PHP: Irrelevant OS: linux Package Version: 0.20.0

Description:
------------
When tags are modified near line 1166 and 1169 in Serializer.php 
they are often prepended with the namespace more than once, 
resulting in invalid XML.

Test script:
---------------
&lt;?php
require_once 'XML/Serializer.php';

$options = array(
   XML_SERIALIZER_OPTION_RETURN_RESULT =&gt; true,
   XML_SERIALIZER_OPTION_NAMESPACE =&gt; &quot;x&quot;,
   );
$serializer = &amp;new XML_Serializer($options);
$foo=array(array(1));
echo $serializer-&gt;serialize($foo);
?&gt;


Expected result:
----------------
&lt;x:array&gt;
&lt;x:XML_Serializer_Tag&gt;
&lt;x:XML_Serializer_Tag&gt;1&lt;/x:XML_Serializer_Tag&gt;
&lt;/x:XML_Serializer_Tag&gt;
&lt;/x:array&gt;

Actual result:
--------------
&lt;x:array&gt;
&lt;x:x:XML_Serializer_Tag&gt;
&lt;x:XML_Serializer_Tag&gt;1&lt;/x:XML_Serializer_Tag&gt;
&lt;/x:x:XML_Serializer_Tag&gt;
&lt;/x:array&gt;</pre>]]></content:encoded>
      <description><![CDATA[<pre>XML_Serializer Bug
Reported by davidmclaughlin
2009-09-09T18:04:29+00:00
PHP: Irrelevant OS: linux Package Version: 0.20.0

Description:
------------
When tags are modified near line 1166 and 1169 in Serializer.php 
they are often prepended with the namespace more than once, 
resulting in invalid XML.

Test script:
---------------
&lt;?php
require_once 'XML/Serializer.php';

$options = array(
   XML_SERIALIZER_OPTION_RETURN_RESULT =&gt; true,
   XML_SERIALIZER_OPTION_NAMESPACE =&gt; &quot;x&quot;,
   );
$serializer = &amp;new XML_Serializer($options);
$foo=array(array(1));
echo $serializer-&gt;serialize($foo);
?&gt;


Expected result:
----------------
&lt;x:array&gt;
&lt;x:XML_Serializer_Tag&gt;
&lt;x:XML_Serializer_Tag&gt;1&lt;/x:XML_Serializer_Tag&gt;
&lt;/x:XML_Serializer_Tag&gt;
&lt;/x:array&gt;

Actual result:
--------------
&lt;x:array&gt;
&lt;x:x:XML_Serializer_Tag&gt;
&lt;x:XML_Serializer_Tag&gt;1&lt;/x:XML_Serializer_Tag&gt;
&lt;/x:x:XML_Serializer_Tag&gt;
&lt;/x:array&gt;</pre>]]></description>
      <dc:date>2009-09-09T18:04:29+00:00</dc:date>
      <dc:creator>david &amp;#x64;&amp;#111;&amp;#x74; mclaughlin &amp;#x61;&amp;#116; redxtechnologies &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>XML_Serializer Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/16402">
      <title>XML_Serializer: Feature/Change Request 16402 [Open] Add 'standalone' attribute in &lt;?xml&gt;</title>
      <link>http://pear.php.net/bugs/16402</link>
      <content:encoded><![CDATA[<pre>XML_Serializer Feature/Change Request
Reported by ts
2009-07-03T13:37:23+00:00
PHP: 5.2.5 OS: Linux Package Version: 0.20.0

Description:
------------
It's currently not possible to define the 'standalone' attribute in the &lt;?xml&gt; declaration.

In other words, it's impossible to construct the following:

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;</pre>]]></content:encoded>
      <description><![CDATA[<pre>XML_Serializer Feature/Change Request
Reported by ts
2009-07-03T13:37:23+00:00
PHP: 5.2.5 OS: Linux Package Version: 0.20.0

Description:
------------
It's currently not possible to define the 'standalone' attribute in the &lt;?xml&gt; declaration.

In other words, it's impossible to construct the following:

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;</pre>]]></description>
      <dc:date>2009-07-03T13:37:23+00:00</dc:date>
      <dc:creator>mail &amp;#x61;&amp;#116; tomsommer &amp;#x64;&amp;#111;&amp;#x74; dk</dc:creator>
      <dc:subject>XML_Serializer Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/16204">
      <title>XML_Serializer: Bug 16204 [Open] Inconsistent data when FORCE_ENUM is on</title>
      <link>http://pear.php.net/bugs/16204</link>
      <content:encoded><![CDATA[<pre>XML_Serializer Bug
Reported by ifeghali
2009-05-07T23:09:19+00:00
PHP: 5.1.6 OS: CentOS 5.3 Package Version: 0.19.2

Description:
------------
When force enum is on, if one serialize an empty array and unserialize it back one will end up with an array with a single empty element.

Test script:
---------------
&lt;?php

require_once 'PEAR.php';
require_once 'XML/Serializer.php';
require_once 'XML/Unserializer.php';

$xml = 'test.xml';

/* SERIALIZE */
$options = array(
    XML_SERIALIZER_OPTION_MODE          =&gt; 'simplexml',
    XML_SERIALIZER_OPTION_ROOT_NAME     =&gt; 'foo',
    XML_SERIALIZER_OPTION_RETURN_RESULT =&gt; true,
);
$serializer =&amp; new XML_Serializer($options);
$data = array('bar' =&gt; array());
$result = $serializer-&gt;serialize($data);
$fxml = @fopen(&quot;$xml&quot;, 'w');
fwrite($fxml, $result);

/* UNSERIALIZE */
$options = array(
    XML_UNSERIALIZER_OPTION_FORCE_ENUM =&gt; array('bar'),
);
$unserializer =&amp; new XML_Unserializer($options);
$result = $unserializer-&gt;unserialize($xml, true);
$result = $unserializer-&gt;getUnserializedData();
print_r($result);

?&gt;

Expected result:
----------------
Array
(
    [bar] =&gt; Array
        (
        )

)

Actual result:
--------------
Array
(
    [bar] =&gt; Array
        (
            [0] =&gt;
        )

)</pre>]]></content:encoded>
      <description><![CDATA[<pre>XML_Serializer Bug
Reported by ifeghali
2009-05-07T23:09:19+00:00
PHP: 5.1.6 OS: CentOS 5.3 Package Version: 0.19.2

Description:
------------
When force enum is on, if one serialize an empty array and unserialize it back one will end up with an array with a single empty element.

Test script:
---------------
&lt;?php

require_once 'PEAR.php';
require_once 'XML/Serializer.php';
require_once 'XML/Unserializer.php';

$xml = 'test.xml';

/* SERIALIZE */
$options = array(
    XML_SERIALIZER_OPTION_MODE          =&gt; 'simplexml',
    XML_SERIALIZER_OPTION_ROOT_NAME     =&gt; 'foo',
    XML_SERIALIZER_OPTION_RETURN_RESULT =&gt; true,
);
$serializer =&amp; new XML_Serializer($options);
$data = array('bar' =&gt; array());
$result = $serializer-&gt;serialize($data);
$fxml = @fopen(&quot;$xml&quot;, 'w');
fwrite($fxml, $result);

/* UNSERIALIZE */
$options = array(
    XML_UNSERIALIZER_OPTION_FORCE_ENUM =&gt; array('bar'),
);
$unserializer =&amp; new XML_Unserializer($options);
$result = $unserializer-&gt;unserialize($xml, true);
$result = $unserializer-&gt;getUnserializedData();
print_r($result);

?&gt;

Expected result:
----------------
Array
(
    [bar] =&gt; Array
        (
        )

)

Actual result:
--------------
Array
(
    [bar] =&gt; Array
        (
            [0] =&gt;
        )

)</pre>]]></description>
      <dc:date>2009-05-07T23:09:19+00:00</dc:date>
      <dc:creator>ifeghali &amp;#x61;&amp;#116; php &amp;#x64;&amp;#111;&amp;#x74; net</dc:creator>
      <dc:subject>XML_Serializer Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/16153">
      <title>XML_Serializer: Bug 16153 [Open] XML Entities are removed entirely</title>
      <link>http://pear.php.net/bugs/16153</link>
      <content:encoded><![CDATA[<pre>XML_Serializer Bug
Reported by galiganu
2009-04-27T02:29:58+00:00
PHP: Irrelevant OS: SunOS Package Version: 0.19.2

Description:
------------
I have the a xml file (test.xml) containing following:

&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
&lt;applications&gt;
    &lt;application&gt;
        &lt;id&gt;1&lt;/id&gt;
        &lt;application_name&gt;A&amp;B&lt;/application_name&gt;
    &lt;/application&gt;
&lt;/applications&gt;

When trying to unserialize it the '&amp;' is removed from the string (entirely).

Please note that everything goes OK on my Windows PC (with same package and php version). Only on the solaris server I have this issue.

Test script:
---------------
&lt;?php

$options = array( 'complexType' =&gt; 'array',
                  'parseAttributes' =&gt; false,
                  'whitespace' =&gt; XML_UNSERIALIZER_WHITESPACE_TRIM,
                  'guessTypes' =&gt; false);

$unserializer = &amp;new XML_UNserializer($options);
$result = $unserializer-&gt;unserialize('test.xml', true);

if ($result === true)
{
    $data = $unserializer-&gt;getUnserializedData();
}

?&gt;

Expected result:
----------------
Array
(
    [application] =&gt; Array
        (
            [id] =&gt; 1
            [application_name] =&gt; A&amp;B
        )

)


Actual result:
--------------
Array
(
    [application] =&gt; Array
        (
            [id] =&gt; 1
            [application_name] =&gt; AB
        )

)</pre>]]></content:encoded>
      <description><![CDATA[<pre>XML_Serializer Bug
Reported by galiganu
2009-04-27T02:29:58+00:00
PHP: Irrelevant OS: SunOS Package Version: 0.19.2

Description:
------------
I have the a xml file (test.xml) containing following:

&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
&lt;applications&gt;
    &lt;application&gt;
        &lt;id&gt;1&lt;/id&gt;
        &lt;application_name&gt;A&amp;B&lt;/application_name&gt;
    &lt;/application&gt;
&lt;/applications&gt;

When trying to unserialize it the '&amp;' is removed from the string (entirely).

Please note that everything goes OK on my Windows PC (with same package and php version). Only on the solaris server I have this issue.

Test script:
---------------
&lt;?php

$options = array( 'complexType' =&gt; 'array',
                  'parseAttributes' =&gt; false,
                  'whitespace' =&gt; XML_UNSERIALIZER_WHITESPACE_TRIM,
                  'guessTypes' =&gt; false);

$unserializer = &amp;new XML_UNserializer($options);
$result = $unserializer-&gt;unserialize('test.xml', true);

if ($result === true)
{
    $data = $unserializer-&gt;getUnserializedData();
}

?&gt;

Expected result:
----------------
Array
(
    [application] =&gt; Array
        (
            [id] =&gt; 1
            [application_name] =&gt; A&amp;B
        )

)


Actual result:
--------------
Array
(
    [application] =&gt; Array
        (
            [id] =&gt; 1
            [application_name] =&gt; AB
        )

)</pre>]]></description>
      <dc:date>2009-05-23T18:12:54+00:00</dc:date>
      <dc:creator>ionut &amp;#x64;&amp;#111;&amp;#x74; aivanesei &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>XML_Serializer Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/15670">
      <title>XML_Serializer: Feature/Change Request 15670 [Open] Line Numbers</title>
      <link>http://pear.php.net/bugs/15670</link>
      <content:encoded><![CDATA[<pre>XML_Serializer Feature/Change Request
Reported by ifeghali
2009-01-18T05:37:32+00:00
PHP: 5.2.6 OS:  Package Version: CVS

Description:
------------
Since XML_Unserializer replaced XML_Tree it would be handy to have line numbers data available to the user as in the later.</pre>]]></content:encoded>
      <description><![CDATA[<pre>XML_Serializer Feature/Change Request
Reported by ifeghali
2009-01-18T05:37:32+00:00
PHP: 5.2.6 OS:  Package Version: CVS

Description:
------------
Since XML_Unserializer replaced XML_Tree it would be handy to have line numbers data available to the user as in the later.</pre>]]></description>
      <dc:date>2009-01-18T05:37:32+00:00</dc:date>
      <dc:creator>ifeghali &amp;#x61;&amp;#116; php &amp;#x64;&amp;#111;&amp;#x74; net</dc:creator>
      <dc:subject>XML_Serializer Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/14112">
      <title>XML_Serializer: Feature/Change Request 14112 [Analyzed] #default is ignored for scalarAsAttributes</title>
      <link>http://pear.php.net/bugs/14112</link>
      <content:encoded><![CDATA[<pre>XML_Serializer Feature/Change Request
Reported by protricity
2008-06-09T15:06:26+00:00
PHP: 5.2.6 OS: Windows Package Version: 0.18.0

Description:
------------
#default is ignored for scalarAsAttributes on line 764 for Serializer.php. Documentation says #default is considered whenever an array is given for tags.

Heres a patch:

        $scalarAsAttributes = false;
        if (is_array($this-&gt;options[XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES])) {
            $scalarAsAttributes =  isset($this-&gt;options[XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES][$tagName])?
									$this-&gt;options[XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES][$tagName]:
									$this-&gt;options[XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES]['#default'];
									
        } elseif ($this-&gt;options[XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES] === true) {
            $scalarAsAttributes = true;
        }

Test script:
---------------
$serializer = &amp;new XML_Serializer(array(
						XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES =&gt; array('#default'=&gt;true,'tag3'=&gt;false),
	));
echo serializer-&gt;serialize(array('tag'=&gt;array('tag2'=&gt;2,'tag3'=&gt;'hi')));

Expected result:
----------------
#default is ignored.

Actual result:
--------------
#default is used to all missing tags.</pre>]]></content:encoded>
      <description><![CDATA[<pre>XML_Serializer Feature/Change Request
Reported by protricity
2008-06-09T15:06:26+00:00
PHP: 5.2.6 OS: Windows Package Version: 0.18.0

Description:
------------
#default is ignored for scalarAsAttributes on line 764 for Serializer.php. Documentation says #default is considered whenever an array is given for tags.

Heres a patch:

        $scalarAsAttributes = false;
        if (is_array($this-&gt;options[XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES])) {
            $scalarAsAttributes =  isset($this-&gt;options[XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES][$tagName])?
									$this-&gt;options[XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES][$tagName]:
									$this-&gt;options[XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES]['#default'];
									
        } elseif ($this-&gt;options[XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES] === true) {
            $scalarAsAttributes = true;
        }

Test script:
---------------
$serializer = &amp;new XML_Serializer(array(
						XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES =&gt; array('#default'=&gt;true,'tag3'=&gt;false),
	));
echo serializer-&gt;serialize(array('tag'=&gt;array('tag2'=&gt;2,'tag3'=&gt;'hi')));

Expected result:
----------------
#default is ignored.

Actual result:
--------------
#default is used to all missing tags.</pre>]]></description>
      <dc:date>2009-06-12T03:15:59+00:00</dc:date>
      <dc:creator>ari &amp;#x61;&amp;#116; songportal &amp;#x64;&amp;#111;&amp;#x74; org</dc:creator>
      <dc:subject>XML_Serializer Feature/Change Request</dc:subject>
    </item>
</rdf:RDF>
