1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Fix a bug in the imageproxy controller

Summary: Somehow this got through last week :( It's a bug that causes the controller to... *ahem*... just not work. Luckily nothing uses this yet so nothing was really affected.

Test Plan: Hit `/file/imageproxy/?uri=http://i.imgur.com/nTvVrYN.jpg` and are served a nice picture of a bird

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, yelirekim

Differential Revision: https://secure.phabricator.com/D16598
This commit is contained in:
Josh Cox 2016-09-26 10:16:48 -04:00
parent 38b10f05a2
commit 7d576c3f94

View file

@ -99,7 +99,7 @@ final class PhabricatorFileImageProxyController
->setViewer(PhabricatorUser::getOmnipotentUser()) ->setViewer(PhabricatorUser::getOmnipotentUser())
->withPHIDs(array($request->getFilePHID())) ->withPHIDs(array($request->getFilePHID()))
->executeOne(); ->executeOne();
if (!file) { if (!$file) {
throw new Exception(pht( throw new Exception(pht(
'The underlying file does not exist, but the cached request was '. 'The underlying file does not exist, but the cached request was '.
'successful. This likely means the file record was manually deleted '. 'successful. This likely means the file record was manually deleted '.