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

Throw a proper 404 page when accessing a task which does not exist.

This commit is contained in:
epriestley 2011-03-30 21:38:24 -07:00
parent b266b570d8
commit 793df0cfc5
2 changed files with 4 additions and 0 deletions

View file

@ -34,6 +34,9 @@ class ManiphestTaskDetailController extends ManiphestController {
$priority_map = ManiphestTaskPriority::getTaskPriorityMap();
$task = id(new ManiphestTask())->load($this->id);
if (!$task) {
return new Aphront404Response();
}
$transactions = id(new ManiphestTransaction())->loadAllWhere(
'taskID = %d',

View file

@ -6,6 +6,7 @@
phutil_require_module('phabricator', 'aphront/response/404');
phutil_require_module('phabricator', 'applications/differential/parser/markup');
phutil_require_module('phabricator', 'applications/maniphest/constants/priority');
phutil_require_module('phabricator', 'applications/maniphest/constants/status');