From 10c679488c9f7184c6165f2a16fb31e778f7efe1 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Fri, 20 Jun 2008 10:51:17 +0000 Subject: [PATCH] Revert live hack from r36493, because it has no effect whatsoever. $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. --- includes/api/ApiMain.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 84fc81f32b..b0096d0c60 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -339,12 +339,7 @@ class ApiMain extends ApiBase { $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); -- 2.20.1