From 18e68d62da0ac727ed24119dad9daf7ac36ba2a8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Fri, 18 Mar 2016 01:14:35 +0100 Subject: [PATCH] ApiQueryStashImageInfo: Don't throw exceptions when the user is not logged in Bug: T130253 Change-Id: If70b919c65a21b57b3022d495756bf250b0ba786 --- includes/api/ApiQueryStashImageInfo.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/api/ApiQueryStashImageInfo.php b/includes/api/ApiQueryStashImageInfo.php index 6d1540b72e..b039a1ec45 100644 --- a/includes/api/ApiQueryStashImageInfo.php +++ b/includes/api/ApiQueryStashImageInfo.php @@ -32,6 +32,10 @@ class ApiQueryStashImageInfo extends ApiQueryImageInfo { } public function execute() { + if ( !$this->getUser()->isLoggedIn() ) { + $this->dieUsage( 'You must be logged-in to have an upload stash', 'notloggedin' ); + } + $params = $this->extractRequestParams(); $modulePrefix = $this->getModulePrefix(); -- 2.20.1