From: Sam Reed Date: Thu, 19 Aug 2010 14:54:09 +0000 (+0000) Subject: Minor followup to r70480 X-Git-Tag: 1.31.0-rc.0~35442 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=5d383466e1653002ff8dd889f8c677b45a02635b;p=lhc%2Fweb%2Fwiklou.git Minor followup to r70480 Only throw missingparam for string === '' when it is required RELEASE-NOTES for breaking change --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 08bfc52373..7755b79754 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -350,7 +350,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 24330) Add &redirect parameter to ?action=edit * (bug 24722) For list=allusers&auprop=blockinfo, only show blockedby and blockreason if the user is actually blocked. -* Add format=dump and format=dumpfm, outputs results in PHP's var_dump() format. +* Add format=dump and format=dumpfm, outputs results in PHP's var_dump() format +* For required string parameters, if '' is provided, this is now classed as missing === Languages updated in 1.17 === diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 93d57d64d9..29881e7e1a 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -664,7 +664,7 @@ abstract class ApiBase { case 'NULL': // nothing to do break; case 'string': - if ( $value === '' ) { + if ( $required && $value === '' ) { $this->dieUsageMsg( array( 'missingparam', $paramName ) ); }