php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17949 bad behaviour of xmlrpc_decode() with xml content in string
Submitted: 2002-06-24 13:29 UTC Modified: 2002-06-24 16:18 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: bruno dot pennec at netcourrier dot com Assigned:
Status: Not a bug Package: XMLRPC-EPI related
PHP Version: 4.2.1 OS: linux 2.4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bruno dot pennec at netcourrier dot com
New email:
PHP Version: OS:

 

 [2002-06-24 13:29 UTC] bruno dot pennec at netcourrier dot com
/**
This code is a xmlrpc server response. One variable contain a xml fragment in which special characters have been "escaped".
The result is :
     bad value 
instead of :
 <qos> <state id='OK'/> <sender>bad value</sender>  </qos>

it is really annoying for exchanging xml documents with each others
**/



<?php

$src = <<<toto
<?xml version="1.0" encoding="ISO-8859-1"?>
<methodResponse>
  <params>
     <param>
        <value>
           <array>
              <data>
                 <value>
                    <array>
                       <data>
                         <value><base64>MzAxMDU2MA==</base64></value>
                         <value><string>&lt;qos&gt; &lt;state id='OK'/&gt; &lt;sender&gt;bad value&lt;/sender&gt;  &lt;/qos&gt;</string></value>
                       </data>
                    </array>
                 </value>
              </data>
           </array>
        </value>
     </param>
  </params>
</methodResponse>
toto
;

print_r( xmlrpc_decode($src));

?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-24 14:15 UTC] bruno dot pennec at netcourrier dot com
sorry, result content for second value must be 
<qos> <state id='OK'> <sender>bad value</sender> </qos>
 [2002-06-24 16:18 UTC] bruno dot pennec at netcourrier dot com
not php fault,mine !
xml_decode works fine !
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Nov 29 20:03:13 2021 UTC