#37057 [Opn->Ver]: direct access to arrays from xmlrpc_decode does not work
| From: | sniper@php.net | Date: | Wed, 12 Apr 2006 14:53:17 +0000 |
| Subject: | #37057 [Opn->Ver]: direct access to arrays from xmlrpc_decode does not work | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-95689@lists.php.net to get a copy of this message | ||
ID: 37057
Updated by: sniper@php.net
Reported By: admin at erazor-zone dot de
-Status: Open
+Status: Verified
Bug Type: XMLRPC-EPI related
Operating System: Linux 2.6 - gentoo
-PHP Version: 5.1.2
+PHP Version: 5.1.3RC3
Previous Comments:
------------------------------------------------------------------------
[2006-04-12 14:28:49] 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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37057&edit=1