Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/151437
Change subject: Remove return from Action::checkCanExecute ...................................................................... Remove return from Action::checkCanExecute No need to return true on success, because failure gives Exception, so the return value needs no checking. Change-Id: Id59bfaebc14bd1c638a721c303f585c1de627508 --- M includes/actions/Action.php M includes/actions/WatchAction.php 2 files changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/37/151437/1 diff --git a/includes/actions/Action.php b/includes/actions/Action.php index 839d0ed..7dd4616 100644 --- a/includes/actions/Action.php +++ b/includes/actions/Action.php @@ -282,7 +282,6 @@ * * @param User $user The user to check, or null to use the context user * @throws UserBlockedError|ReadOnlyError|PermissionsError - * @return bool True on success */ protected function checkCanExecute( User $user ) { $right = $this->getRestriction(); @@ -304,7 +303,6 @@ if ( $this->requiresWrite() && wfReadOnly() ) { throw new ReadOnlyError(); } - return true; } /** diff --git a/includes/actions/WatchAction.php b/includes/actions/WatchAction.php index 2c7502e..ab8d9ef 100644 --- a/includes/actions/WatchAction.php +++ b/includes/actions/WatchAction.php @@ -92,7 +92,7 @@ throw new UserNotLoggedIn( $reasonMsg, 'watchnologin' ); } - return parent::checkCanExecute( $user ); + parent::checkCanExecute( $user ); } /** -- To view, visit https://gerrit.wikimedia.org/r/151437 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id59bfaebc14bd1c638a721c303f585c1de627508 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender <umherirrender_de...@web.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits