From cc722a0b4c6ada109ac4302d23735ed1909c6f6b Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 19 Jun 2008 23:48:09 +0000 Subject: [PATCH] Apply live hack -- exception for invalid actions (as opposed to....?) --- includes/api/ApiMain.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); -- 2.20.1