From: Brion Vibber Date: Thu, 19 Jun 2008 23:48:09 +0000 (+0000) Subject: Apply live hack -- exception for invalid actions (as opposed to....?) X-Git-Tag: 1.31.0-rc.0~46928 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=cc722a0b4c6ada109ac4302d23735ed1909c6f6b;p=lhc%2Fweb%2Fwiklou.git Apply live hack -- exception for invalid actions (as opposed to....?) --- diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index b0096d0c60..84fc81f32b 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -339,7 +339,12 @@ 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);