r74774 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74773‎ | r74774 | r74775 >
Date:14:24, 14 October 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Changes for 0.4 - fixed issue with check for unknown parameters in case of fatal error
Modified paths:
  • /trunk/extensions/Validator/includes/Validator.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Validator/includes/Validator.php
@@ -224,12 +224,14 @@
225225 public function validateParameters() {
226226 $this->doParamProcessing();
227227
228 - // Loop over the remaining raw parameters.
229 - // These are unrecognized parameters, as they where not used by any parameter definition.
230 - foreach ( $this->rawParameters as $paramName => $paramValue ) {
231 - $this->registerNewError(
232 - wfMsgExt( 'validator_error_unknown_argument', 'parsemag', $paramName )
233 - );
 228+ if ( !$this->hasfatalError() ) {
 229+ // Loop over the remaining raw parameters.
 230+ // These are unrecognized parameters, as they where not used by any parameter definition.
 231+ foreach ( $this->rawParameters as $paramName => $paramValue ) {
 232+ $this->registerNewError(
 233+ wfMsgExt( 'validator_error_unknown_argument', 'parsemag', $paramName )
 234+ );
 235+ }
234236 }
235237 }
236238

Status & tagging log