From: arno Date: Mon, 27 Sep 2010 08:37:29 +0000 (+0200) Subject: output error message only if error code is 400 X-Git-Tag: v0.2.1~3 X-Git-Url: https://dev.renevier.net/?p=syj.git;a=commitdiff_plain;h=e85f4874bb734d7b84cc2d10955db2065ac4f261 output error message only if error code is 400 --- diff --git a/application/controllers/ErrorController.php b/application/controllers/ErrorController.php index fed3945..28f321b 100644 --- a/application/controllers/ErrorController.php +++ b/application/controllers/ErrorController.php @@ -41,7 +41,7 @@ class ErrorController extends Zend_Controller_Action $log->crit($this->view->message, $error->exception); } - if ($error_code != 404 and $error_code != 410 and $error->request->isXmlHttpRequest()) { + if ($error_code == 400 and $error->request->isXmlHttpRequest()) { return $this->_helper->json(array('message' => $error->exception->getMessage())); }