From 40294d93bac0eb96d8cc42c46baa126580631071 Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Tue, 26 Apr 2011 19:20:19 +0000 Subject: [PATCH] Follow-up r86954: make one centralised call to array_values(), there are more breakages of this kind --- includes/api/ApiParamInfo.php | 1 + 1 file changed, 1 insertion(+) 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' ); } } -- 2.20.1