Index: trunk/phase3/includes/api/ApiBase.php |
— | — | @@ -496,18 +496,14 @@ |
497 | 497 | foreach ( $params as $paramName => $paramSettings ) { |
498 | 498 | $results[$paramName] = $this->getParameterFromSettings( |
499 | 499 | $paramName, $paramSettings, $parseLimit ); |
| 500 | + |
| 501 | + if( isset( $paramSettings[self::PARAM_REQUIRED] ) && !isset( $results[$paramName] ) ) { |
| 502 | + $this->dieUsageMsg( array( 'missingparam', $paramName ) ); |
| 503 | + } |
500 | 504 | } |
501 | 505 | } |
502 | 506 | $this->mParamCache[$parseLimit] = $results; |
503 | 507 | } |
504 | | - |
505 | | - $allparams = $this->getAllowedParams(); |
506 | | - foreach( $this->mParamCache[$parseLimit] as $param => $val ) { |
507 | | - if( isset( $allparams[$param][ApiBase::PARAM_REQUIRED] ) && !isset( $val ) ) { |
508 | | - $this->dieUsageMsg( array( 'missingparam', $param ) ); |
509 | | - } |
510 | | - } |
511 | | - |
512 | 508 | return $this->mParamCache[$parseLimit]; |
513 | 509 | } |
514 | 510 | |