From c48bbaec3c83a34a0117197968d8510690d40709 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Fri, 1 Oct 2010 19:37:38 +0000 Subject: [PATCH] Remove error from ApiUserrights getPossibleErrors, it doesn't explicitally throw an error for missing user param. Does some other fancy errors from the special page. We should have a way for that to tell us it throws some errors.... Remove trailing whitespace --- includes/api/ApiParamInfo.php | 3 +-- includes/api/ApiUserrights.php | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/includes/api/ApiParamInfo.php b/includes/api/ApiParamInfo.php index 801ea06403..450191ec6a 100644 --- a/includes/api/ApiParamInfo.php +++ b/includes/api/ApiParamInfo.php @@ -119,11 +119,10 @@ class ApiParamInfo extends ApiBase { if ( isset( $p[ApiBase::PARAM_DEPRECATED] ) && $p[ApiBase::PARAM_DEPRECATED] ) { $a['deprecated'] = ''; } - if ( isset( $p[ApiBase::PARAM_REQUIRED] ) && $p[ApiBase::PARAM_REQUIRED] ) { $a['required'] = ''; } - + if ( !is_array( $p ) ) { if ( is_bool( $p ) ) { $a['type'] = 'bool'; diff --git a/includes/api/ApiUserrights.php b/includes/api/ApiUserrights.php index 5f253ce229..2649f9dd98 100644 --- a/includes/api/ApiUserrights.php +++ b/includes/api/ApiUserrights.php @@ -122,9 +122,7 @@ class ApiUserrights extends ApiBase { } public function getPossibleErrors() { - return array_merge( parent::getPossibleErrors(), array( - array( 'missingparam', 'user' ), - ) ); + return parent::getPossibleErrors(); } public function getTokenSalt() { -- 2.20.1