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:
parent
d8713f6f0b
commit
ae03cb7fff
1 changed files with 3 additions and 0 deletions
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue