From: Sam Reed Date: Fri, 1 Oct 2010 19:37:38 +0000 (+0000) Subject: Remove error from ApiUserrights getPossibleErrors, it doesn't explicitally throw... X-Git-Tag: 1.31.0-rc.0~34704 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles%22%2C%22id_article=%24ze_article%22%29%20.%20%22?a=commitdiff_plain;h=c48bbaec3c83a34a0117197968d8510690d40709;p=lhc%2Fweb%2Fwiklou.git 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 --- 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() {