From: Reedy Date: Tue, 3 Apr 2012 18:07:19 +0000 (+0100) Subject: Bug 35671 - PHP Notice: Undefined index: gettoken in includes/api/ApiMain.php on... X-Git-Tag: 1.31.0-rc.0~24054^2 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=d1e90b650d2986ded98150f8cfdaab6965f39107;p=lhc%2Fweb%2Fwiklou.git Bug 35671 - PHP Notice: Undefined index: gettoken in includes/api/ApiMain.php on line 598 Change-Id: I220dfcd964ceb4254b310140b916a7c63a3044ef --- diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 8f5cfcaf51..8fd8883109 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -595,7 +595,7 @@ class ApiMain extends ApiBase { // Die if token required, but not provided (unless there is a gettoken parameter) $salt = $module->getTokenSalt(); - if ( $salt !== false && !$moduleParams['gettoken'] ) { + if ( $salt !== false && isset( $moduleParams['gettoken'] ) && !$moduleParams['gettoken'] ) { if ( !isset( $moduleParams['token'] ) ) { $this->dieUsageMsg( array( 'missingparam', 'token' ) ); } else {