Track non-existing session in otpoll

This commit is contained in:
Victor Dubiniuk 2013-10-16 20:39:25 +03:00
parent cb6dccfab2
commit 9bfc7e5058

View File

@ -45,7 +45,15 @@ try{
$session = new Db_Session();
$sessionData = $session->load($esId)->getData();
$file = new File(@$sessionData['file_id']);
try {
$file = new File(@$sessionData['file_id']);
} catch (\Exception $e){
Helper::warnLog('Error. Session no longer exists. ' . $e->getMessage());
$ex = new BadRequestException();
$ex->setBody("{err:'bad request: [" . $request->getRawRequest() . "]'}");
throw $ex;
}
if (!$file->isPublicShare()){
Controller::preDispatch(false);
} else {