From 0c8d742283ce149c865bb009b87b6bc66233d6c5 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Mon, 8 Aug 2005 18:46:32 +0000 Subject: [PATCH] - #28464: fix XMLRPC array vs. struct type-checking --- includes/xmlrpc.inc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/includes/xmlrpc.inc b/includes/xmlrpc.inc index fe159181056..dd5647f0ba6 100644 --- a/includes/xmlrpc.inc +++ b/includes/xmlrpc.inc @@ -36,7 +36,7 @@ function xmlrpc_value_calculate_type(&$xmlrpc_value) { case 'integer': return 'int'; case 'array': - return range(0, count($xmlrpc_value->data) - 1) == array_keys($xmlrpc_value->data) ? 'array' : 'struct'; + return range(0, count($xmlrpc_value->data) - 1) === array_keys($xmlrpc_value->data) ? 'array' : 'struct'; case 'object': if ($xmlrpc_value->data->is_date) { return 'date'; @@ -64,7 +64,6 @@ function xmlrpc_value_get_xml($xmlrpc_value) { return ''. $xmlrpc_value->data .''; break; case 'string': - /*** check this! this was htmlspecialchars, I changed to check_plain ***/ return ''. check_plain($xmlrpc_value->data) .''; break; case 'array': @@ -78,7 +77,6 @@ function xmlrpc_value_get_xml($xmlrpc_value) { case 'struct': $return = ''."\n"; foreach ($xmlrpc_value->data as $name => $value) { - /*** check this! this was htmlspecialchars, I changed to check_plain ***/ $return .= " ". check_plain($name) .""; $return .= xmlrpc_value_get_xml($value)."\n"; }