r71295 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71294‎ | r71295 | r71296 >
Date:14:54, 19 August 2010
Author:reedy
Status:ok
Tags:
Comment:
Minor followup to r70480

Only throw missingparam for string === '' when it is required

RELEASE-NOTES for breaking change
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiBase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiBase.php
@@ -664,7 +664,7 @@
665665 case 'NULL': // nothing to do
666666 break;
667667 case 'string':
668 - if ( $value === '' ) {
 668+ if ( $required && $value === '' ) {
669669 $this->dieUsageMsg( array( 'missingparam', $paramName ) );
670670 }
671671
Index: trunk/phase3/RELEASE-NOTES
@@ -350,7 +350,8 @@
351351 * (bug 24330) Add &redirect parameter to ?action=edit
352352 * (bug 24722) For list=allusers&auprop=blockinfo, only show blockedby and blockreason if
353353 the user is actually blocked.
354 -* Add format=dump and format=dumpfm, outputs results in PHP's var_dump() format.
 354+* Add format=dump and format=dumpfm, outputs results in PHP's var_dump() format
 355+* For required string parameters, if '' is provided, this is now classed as missing
355356
356357 === Languages updated in 1.17 ===
357358

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70480Followup r70479...reedy21:21, 4 August 2010

Status & tagging log