From 61272cd42caf6eb4f7e4cd8b72309c321d5cf29b Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Tue, 16 Jun 2015 14:58:27 -0400 Subject: [PATCH] Handle 404s with the correct error page, and don't log them --- airtime_mvc/application/controllers/ErrorController.php | 9 ++++----- airtime_mvc/application/views/scripts/error/error.phtml | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/airtime_mvc/application/controllers/ErrorController.php b/airtime_mvc/application/controllers/ErrorController.php index 5fd75837e..774db9926 100644 --- a/airtime_mvc/application/controllers/ErrorController.php +++ b/airtime_mvc/application/controllers/ErrorController.php @@ -7,7 +7,6 @@ class ErrorController extends Zend_Controller_Action { //We cannot show that. $this->view->layout()->disableLayout(); $this->setupCSS(); - } public function errorAction() { @@ -31,9 +30,9 @@ class ErrorController extends Zend_Controller_Action { break; } } else { - $exceptions = $this->_getAllParams(); - Logging::error($exceptions); - $this->error500Action(); + //$exceptions = $this->_getAllParams(); + //Logging::error($exceptions); + $this->error404Action(); return; } @@ -74,7 +73,7 @@ class ErrorController extends Zend_Controller_Action { * 404 error - route or controller */ public function error404Action() { - $this->_helper->viewRenderer('error-404'); + $this->_helper->viewRenderer('error'); $this->getResponse()->setHttpResponseCode(404); $this->view->message = _('Page not found.'); } diff --git a/airtime_mvc/application/views/scripts/error/error.phtml b/airtime_mvc/application/views/scripts/error/error.phtml index 7a17ae7c6..96f90c325 100644 --- a/airtime_mvc/application/views/scripts/error/error.phtml +++ b/airtime_mvc/application/views/scripts/error/error.phtml @@ -8,7 +8,7 @@
-

+

escape($this->message)?>