$params['action'] cannot be an invalid action, because the $params array is filled by ApiBase::extractRequestParams() which checks whether the parameters are valid and throws an error message (ironically implemented with a UsageException) if they're not.
$this->mShowVersions = $params['version'];
$this->mAction = $params['action'];
-
- # For debugging -- TS
- if ( !isset( $this->mModules[$this->mAction] ) ) {
- throw new MWException( "Invalid action: {$this->mAction}" );
- }
-
+
// Instantiate the module requested by the user
$module = new $this->mModules[$this->mAction] ($this, $this->mAction);