mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 00:48:25 +00:00
changes in the error dir
This commit is contained in:
parent
d264d0feb5
commit
afc5cd4277
2 changed files with 3 additions and 3 deletions
|
@ -194,7 +194,7 @@ class ExceptionRenderer {
|
|||
public function error400($error) {
|
||||
$message = $error->getMessage();
|
||||
if (Configure::read('debug') == 0 && $error instanceof CakeException) {
|
||||
$message = __('Not Found');
|
||||
$message = __d('cake', 'Not Found');
|
||||
}
|
||||
$url = $this->controller->request->here();
|
||||
$this->controller->response->statusCode($error->getCode());
|
||||
|
@ -216,7 +216,7 @@ class ExceptionRenderer {
|
|||
$code = ($error->getCode() > 500) ? $error->getCode() : 500;
|
||||
$this->controller->response->statusCode($code);
|
||||
$this->controller->set(array(
|
||||
'name' => __('An Internal Error Has Occurred'),
|
||||
'name' => __d('cake', 'An Internal Error Has Occurred'),
|
||||
'message' => h($url),
|
||||
'error' => $error,
|
||||
));
|
||||
|
|
|
@ -182,7 +182,7 @@ class CakeException extends RuntimeException {
|
|||
public function __construct($message, $code = 500) {
|
||||
if (is_array($message)) {
|
||||
$this->_attributes = $message;
|
||||
$message = __($this->_messageTemplate, $message);
|
||||
$message = __d('cake', $this->_messageTemplate, $message);
|
||||
}
|
||||
parent::__construct($message, $code);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue