direct access to arrays from xmlrpc_decode does not work
| Bug #37057 | direct access to arrays from xmlrpc_decode does not work | ||||
|---|---|---|---|---|---|
| Submitted: | 2006-04-12 14:28 UTC | Modified: | 2006-04-12 15:14 UTC | ||
| From: | admin at erazor-zone dot de | Assigned: | tony2001 (profile) | ||
| Status: | Closed | Package: | XMLRPC-EPI related | ||
| PHP Version: | 5.1.3RC3 | OS: | Linux 2.6 - gentoo | ||
| Private report: | No | CVE-ID: | None | ||
[2006-04-12 14:28 UTC] admin at erazor-zone dot de
Description:
------------
xmlrpc_decode produces something like:
Array
(
[50] => 0.29
)
addressing the addressing it like $variable[50] does not
work :-( (empty result), same with '50' as key.
Reproduce code:
---------------
$response='<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>50</name>
<value><string>0.29</string></value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>';
$retval_bugged=xmlrpc_decode($response);
print_r($retval_bugged);
/* returns:
Array
(
[50] => 0.29
)
*/
Expected result:
----------------
echo $retval_bugged[50];
//should write 0.29
echo $retval_bugged['50'];
//should write 0.29
Actual result:
--------------
echo $retval_bugged[50];
echo $retval_bugged['50'];
//no result
foreach($retval_bugged as $key=>$value) {
$retval[$key]=$value;
}
echo $retval[50];
//works
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2006-04-12 15:14 UTC] tony2001@php.net