From: Max Semenik Date: Tue, 26 Apr 2011 19:20:19 +0000 (+0000) Subject: Follow-up r86954: make one centralised call to array_values(), there are more breakag... X-Git-Tag: 1.31.0-rc.0~30544 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=40294d93bac0eb96d8cc42c46baa126580631071;p=lhc%2Fweb%2Fwiklou.git Follow-up r86954: make one centralised call to array_values(), there are more breakages of this kind --- diff --git a/includes/api/ApiParamInfo.php b/includes/api/ApiParamInfo.php index ed3b450de4..26f0398f0f 100644 --- a/includes/api/ApiParamInfo.php +++ b/includes/api/ApiParamInfo.php @@ -174,6 +174,7 @@ class ApiParamInfo extends ApiBase { if ( isset( $p[ApiBase::PARAM_TYPE] ) ) { $a['type'] = $p[ApiBase::PARAM_TYPE]; if ( is_array( $a['type'] ) ) { + $a['type'] = array_values( $a['type'] ); // to prevent sparse arrays from being serialized to JSON as objects $result->setIndexedTagName( $a['type'], 't' ); } }