#37746 [WFx]: Incorrect encoding of PHP associative arrays in XML-RPC response.

From: Date: Wed, 28 Nov 2007 01:09:43 +0000
Subject: #37746 [WFx]: Incorrect encoding of PHP associative arrays in XML-RPC response.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-120157@lists.php.net to get a copy of this message
ID: 37746 Updated by: yunosh@php.net Reported By: glideraerobatics at hotmail dot com Status: Wont fix Bug Type: XMLRPC-EPI related Operating System: FreeBSD 6.1 PHP Version: 5.1.4 New Comment: I can't see how fixing this is going to break existing code. With the current implementation, using array keys from xmlrpc result sets is useless, because they don't have a meaning. So people will either use structs, or loop through the arrays ignoring the keys completely. Previous Comments: ------------------------------------------------------------------------ [2006-06-21 13:35:20] glideraerobatics at hotmail dot com Ok, but then the question: Could a 'mixed' array be of any use in xmlrpc communication if the numeric keys are being lost? I can't (yet) see how anybody could be relying on that because the xmlrpc response is useless/invalid in such cases. ------------------------------------------------------------------------ [2006-06-21 08:19:02] mike@php.net Well, 4 years with an unknown amount of people relying on it. mike@honeybadger:~$ cli -r 'var_dump(xmlrpc_get_type(array(123=>123)), xmlrpc_get_type(array("a"=>123)), xmlrpc_get_type(array(123=>123,"a"=>123)));' string(5) "array" string(6) "struct" string(5) "mixed" ------------------------------------------------------------------------ [2006-06-21 01:36:19] glideraerobatics at hotmail dot com I'm confused. Is "It's been that way since the very first release" the reason why it won't be fixed? I'm glad Microsoft didn't think that way otherwise I'ld still be seeing multiple BSOD's every day. ------------------------------------------------------------------------ [2006-06-19 08:20:56] mike@php.net It's been that way since the very first release, if the array contains numeric indices only. ------------------------------------------------------------------------ [2006-06-08 15:02:04] lars dot maes at gmail dot com I confirm this bug on Debian 3.1a sarge with php4 version 4.3.10 The chr(0x00) solution also works ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/37746 -- Edit this bug report at http://bugs.php.net/?id=37746&edit=1

« previous php.bugs (#120157) next »