Index: trunk/phase3/includes/api/ApiMain.php |
— | — | @@ -412,7 +412,7 @@ |
413 | 413 | $this->mModule = $module; |
414 | 414 | |
415 | 415 | //Die if token required, but not provided (unless there is a gettoken parameter) |
416 | | - if ( $module->requiresToken() && is_null( $params['token'] ) && !is_null( $params['gettoken'] ) ) |
| 416 | + if ( $module->requiresToken() && !isset( $params['token'] ) && isset( $params['gettoken'] ) ) |
417 | 417 | $this->dieUsageMsg( array( 'missingparam', 'token' ) ); |
418 | 418 | |
419 | 419 | if ( $module->shouldCheckMaxlag() && isset( $params['maxlag'] ) ) { |