Skip to content
Snippets Groups Projects
Commit b7bed849 authored by Tim Steiner's avatar Tim Steiner
Browse files

Throw an exception when a user tries to view a request that does not exist.

parent 3ef0fc1b
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,9 @@ class Requests_ViewController extends App_Controller_Action
$session = new Zend_Session_Namespace('My Requests');
$request = Requests_RequestModel::find($id);
if (!$request) {
throw new Zend_Exception('The specified request does not exist.');
}
$user = Auth_UserModel::findCurrentUser();
$viewTime = Requests_ViewTimeModel::findByUserAndRequest($user, $request);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment