#37057 [Asn->Csd]: direct access to arrays from xmlrpc_decode does not work
| From: | tony2001@php.net | Date: | Wed, 12 Apr 2006 15:14:52 +0000 |
| Subject: | #37057 [Asn->Csd]: direct access to arrays from xmlrpc_decode does not work | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-95697@lists.php.net to get a copy of this message | ||
ID: 37057
Updated by: tony2001@php.net
Reported By: admin at erazor-zone dot de
-Status: Assigned
+Status: Closed
Bug Type: XMLRPC-EPI related
Operating System: Linux 2.6 - gentoo
PHP Version: 5.1.3RC3
Assigned To: tony2001
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
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