r70489 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70488‎ | r70489 | r70490 >
Date:06:08, 5 August 2010
Author:reedy
Status:reverted
Tags:
Comment:
Move if ( is_array( $value ) && !$dupes ) { up to else block after the first !is_array. If it's not not an array, it's an array, and therefore, we can just filter dupes if requested
Modified paths:
  • /trunk/phase3/includes/api/ApiBase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiBase.php
@@ -736,10 +736,8 @@
737737 default:
738738 ApiBase::dieDebug( __METHOD__, "Param $encParamName's type is unknown - $type" );
739739 }
740 - }
741 -
742 - // Throw out duplicates if requested
743 - if ( is_array( $value ) && !$dupes ) {
 740+ } else if ( !$dupes ) {
 741+ // Throw out duplicates if requested
744742 $value = array_unique( $value );
745743 }
746744

Follow-up revisions

RevisionCommit summaryAuthorDate
r70490Revert r70489reedy06:58, 5 August 2010

Status & tagging log