1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 14:00:56 +01:00

Issue a proper 404 when trying to edit nonexistent events

Summary: We'll fatal a little later here when trying to call methods. 404 instead.

Test Plan: Visited `/calendar/event/edit/9999999/` or similar.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D8591
This commit is contained in:
epriestley 2014-03-21 19:11:48 -07:00
parent d8713f6f0b
commit ae03cb7fff

View file

@ -47,6 +47,9 @@ final class PhabricatorCalendarEventEditController
PhabricatorPolicyCapability::CAN_EDIT,
))
->executeOne();
if (!$status) {
return new Aphront404Response();
}
$end_time->setValue($status->getDateTo());
$start_time->setValue($status->getDateFrom());