mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
keep name as well
This commit is contained in:
parent
85337a5d15
commit
71fb17e092
1 changed files with 12 additions and 8 deletions
|
@ -188,10 +188,11 @@ class ExceptionRenderer {
|
||||||
$this->controller->response->statusCode($code);
|
$this->controller->response->statusCode($code);
|
||||||
$this->controller->set(array(
|
$this->controller->set(array(
|
||||||
'code' => $code,
|
'code' => $code,
|
||||||
'url' => h($url),
|
'mame' => h($error->getMessage()),
|
||||||
'message' => h($error->getMessage()),
|
'message' => h($error->getMessage()),
|
||||||
|
'url' => h($url),
|
||||||
'error' => $error,
|
'error' => $error,
|
||||||
'_serialize' => array('code', 'url', 'message')
|
'_serialize' => array('code', 'name', 'message', 'url')
|
||||||
));
|
));
|
||||||
$this->controller->set($error->getAttributes());
|
$this->controller->set($error->getAttributes());
|
||||||
$this->_outputMessage($this->template);
|
$this->_outputMessage($this->template);
|
||||||
|
@ -211,10 +212,11 @@ class ExceptionRenderer {
|
||||||
$url = $this->controller->request->here();
|
$url = $this->controller->request->here();
|
||||||
$this->controller->response->statusCode($error->getCode());
|
$this->controller->response->statusCode($error->getCode());
|
||||||
$this->controller->set(array(
|
$this->controller->set(array(
|
||||||
'url' => h($url),
|
'name' => h($message),
|
||||||
'message' => h($message),
|
'message' => h($message),
|
||||||
|
'url' => h($url),
|
||||||
'error' => $error,
|
'error' => $error,
|
||||||
'_serialize' => array('url', 'message')
|
'_serialize' => array('name', 'message', 'url')
|
||||||
));
|
));
|
||||||
$this->_outputMessage('error400');
|
$this->_outputMessage('error400');
|
||||||
}
|
}
|
||||||
|
@ -234,10 +236,11 @@ class ExceptionRenderer {
|
||||||
$code = ($error->getCode() > 500 && $error->getCode() < 506) ? $error->getCode() : 500;
|
$code = ($error->getCode() > 500 && $error->getCode() < 506) ? $error->getCode() : 500;
|
||||||
$this->controller->response->statusCode($code);
|
$this->controller->response->statusCode($code);
|
||||||
$this->controller->set(array(
|
$this->controller->set(array(
|
||||||
'url' => h($url),
|
'name' => h($message),
|
||||||
'message' => h($message),
|
'message' => h($message),
|
||||||
|
'url' => h($url),
|
||||||
'error' => $error,
|
'error' => $error,
|
||||||
'_serialize' => array('url', 'message')
|
'_serialize' => array('name', 'message', 'url')
|
||||||
));
|
));
|
||||||
$this->_outputMessage('error500');
|
$this->_outputMessage('error500');
|
||||||
}
|
}
|
||||||
|
@ -254,10 +257,11 @@ class ExceptionRenderer {
|
||||||
$this->controller->response->statusCode($code);
|
$this->controller->response->statusCode($code);
|
||||||
$this->controller->set(array(
|
$this->controller->set(array(
|
||||||
'code' => $code,
|
'code' => $code,
|
||||||
'url' => h($url),
|
'name' => h($error->getMessage()),
|
||||||
'message' => h($error->getMessage()),
|
'message' => h($error->getMessage()),
|
||||||
|
'url' => h($url),
|
||||||
'error' => $error,
|
'error' => $error,
|
||||||
'_serialize' => array('code', 'url', 'message', 'error')
|
'_serialize' => array('code', 'name', 'message', 'url', 'error')
|
||||||
));
|
));
|
||||||
$this->_outputMessage($this->template);
|
$this->_outputMessage($this->template);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue