From: Bartosz DziewoƄski Date: Fri, 18 Mar 2016 00:14:35 +0000 (+0100) Subject: ApiQueryStashImageInfo: Don't throw exceptions when the user is not logged in X-Git-Tag: 1.31.0-rc.0~7572^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/journal.php?a=commitdiff_plain;h=18e68d62da0ac727ed24119dad9daf7ac36ba2a8;p=lhc%2Fweb%2Fwiklou.git ApiQueryStashImageInfo: Don't throw exceptions when the user is not logged in Bug: T130253 Change-Id: If70b919c65a21b57b3022d495756bf250b0ba786 --- 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();