From 7e4c602a60b92cb1fe00d1d0d7e00b40160be27a Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 14:07:46 +0200 Subject: [PATCH] Don't throw exceptions manually in the StaticController --- application/controllers/StaticController.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/application/controllers/StaticController.php b/application/controllers/StaticController.php index 764eaaa0d..efbf8b6fe 100644 --- a/application/controllers/StaticController.php +++ b/application/controllers/StaticController.php @@ -5,7 +5,6 @@ use Icinga\Web\Controller; use Icinga\Application\Icinga; use Icinga\Application\Logger; use Icinga\Web\FileCache; -use Zend_Controller_Action_Exception as ActionException; /** * Delivery static content to clients @@ -64,10 +63,7 @@ class StaticController extends Controller $filePath = realpath($basedir . '/public/img/' . $file); if (! $filePath || strpos($filePath, $basedir) !== 0) { - throw new ActionException(sprintf( - '%s does not exist', - $filePath - ), 404); + $this->httpNotFound('%s does not exist', $filePath); } if (preg_match('/\.([a-z]+)$/i', $file, $m)) { $extension = $m[1];