From: Raimond Spekking Date: Mon, 15 Feb 2010 09:22:11 +0000 (+0000) Subject: Fix fir r62482: PHP Notice: Undefined index: token in /www/w/includes/api/ApiMain... X-Git-Tag: 1.31.0-rc.0~37753 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=b1aba70d753712f323d93a6042797a8fbcdda931;p=lhc%2Fweb%2Fwiklou.git Fix fir r62482: PHP Notice: Undefined index: token in /www/w/includes/api/ApiMain.php on line 415 --- diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index ae31c2c844..55de405066 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -412,7 +412,7 @@ class ApiMain extends ApiBase { $this->mModule = $module; //Die if token required, but not provided (unless there is a gettoken parameter) - if ( $module->requiresToken() && is_null( $params['token'] ) && !is_null( $params['gettoken'] ) ) + if ( $module->requiresToken() && !isset( $params['token'] ) && isset( $params['gettoken'] ) ) $this->dieUsageMsg( array( 'missingparam', 'token' ) ); if ( $module->shouldCheckMaxlag() && isset( $params['maxlag'] ) ) {