Permalink
Browse files

keep name as well

  • Loading branch information...
1 parent 85337a5 commit 71fb17e0923b11f5c7f4007c22ac574ffd19e3ca @dereuromark dereuromark committed Jan 3, 2014
Showing with 12 additions and 8 deletions.
  1. +12 −8 lib/Cake/Error/ExceptionRenderer.php
@@ -188,10 +188,11 @@ protected function _cakeError(CakeException $error) {
$this->controller->response->statusCode($code);
$this->controller->set(array(
'code' => $code,
- 'url' => h($url),
+ 'mame' => h($error->getMessage()),
'message' => h($error->getMessage()),
+ 'url' => h($url),
'error' => $error,
- '_serialize' => array('code', 'url', 'message')
+ '_serialize' => array('code', 'name', 'message', 'url')
));
$this->controller->set($error->getAttributes());
$this->_outputMessage($this->template);
@@ -211,10 +212,11 @@ public function error400($error) {
$url = $this->controller->request->here();
$this->controller->response->statusCode($error->getCode());
$this->controller->set(array(
- 'url' => h($url),
+ 'name' => h($message),
'message' => h($message),
+ 'url' => h($url),
'error' => $error,
- '_serialize' => array('url', 'message')
+ '_serialize' => array('name', 'message', 'url')
));
$this->_outputMessage('error400');
}
@@ -234,10 +236,11 @@ public function error500($error) {
$code = ($error->getCode() > 500 && $error->getCode() < 506) ? $error->getCode() : 500;
$this->controller->response->statusCode($code);
$this->controller->set(array(
- 'url' => h($url),
+ 'name' => h($message),
'message' => h($message),
+ 'url' => h($url),
'error' => $error,
- '_serialize' => array('url', 'message')
+ '_serialize' => array('name', 'message', 'url')
));
$this->_outputMessage('error500');
}
@@ -254,10 +257,11 @@ public function pdoError(PDOException $error) {
$this->controller->response->statusCode($code);
$this->controller->set(array(
'code' => $code,
- 'url' => h($url),
+ 'name' => h($error->getMessage()),
'message' => h($error->getMessage()),
+ 'url' => h($url),
'error' => $error,
- '_serialize' => array('code', 'url', 'message', 'error')
+ '_serialize' => array('code', 'name', 'message', 'url', 'error')
));
$this->_outputMessage($this->template);
}

0 comments on commit 71fb17e

Please sign in to comment.