r70480 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70479‎ | r70480 | r70481 >
Date:21:21, 4 August 2010
Author:reedy
Status:resolved (Comments)
Tags:
Comment:
Followup r70479

If string is required, but it's value === '', that's missing!
Modified paths:
  • /trunk/phase3/includes/api/ApiBase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiBase.php
@@ -662,6 +662,10 @@
663663 case 'NULL': // nothing to do
664664 break;
665665 case 'string': // nothing to do
 666+ if ( $value === '' ) {
 667+ $this->dieUsageMsg( array( 'missingparam', $paramName ) );
 668+ }
 669+
666670 break;
667671 case 'integer': // Force everything using intval() and optionally validate limits
668672

Follow-up revisions

RevisionCommit summaryAuthorDate
r70488Followup r70480, per Nikerabbits comment, there '''is''' something to doreedy06:02, 5 August 2010
r71295Minor followup to r70480...reedy14:54, 19 August 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70479Further followup to r70460/r70461 and r70477...reedy21:19, 4 August 2010

Comments

#Comment by Nikerabbit (talk | contribs)   02:30, 5 August 2010

Forgot to update the comment?

#Comment by Bryan (talk | contribs)   14:49, 19 August 2010

Breaking change -> release-notes

#Comment by Bryan (talk | contribs)   14:54, 19 August 2010

Also should only be checked on $required === true

Status & tagging log