r86973 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86972‎ | r86973 | r86974 >
Date:19:20, 26 April 2011
Author:maxsem
Status:ok
Tags:
Comment:
Follow-up r86954: make one centralised call to array_values(), there are more breakages of this kind
Modified paths:
  • /trunk/phase3/includes/api/ApiParamInfo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiParamInfo.php
@@ -174,6 +174,7 @@
175175 if ( isset( $p[ApiBase::PARAM_TYPE] ) ) {
176176 $a['type'] = $p[ApiBase::PARAM_TYPE];
177177 if ( is_array( $a['type'] ) ) {
 178+ $a['type'] = array_values( $a['type'] ); // to prevent sparse arrays from being serialized to JSON as objects
178179 $result->setIndexedTagName( $a['type'], 't' );
179180 }
180181 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r86974Oops, forgot to revert r86954 in r86973, not needed anymoremaxsem19:23, 26 April 2011
r871701.17: MFT r85546, r86450, r86625, r86805, r86841, r86904, r86973, r87030catrope16:57, 30 April 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r86954Without this array_values(), user groups will be exported to JSON as object i...maxsem17:29, 26 April 2011

Status & tagging log