mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
closes #4842, clean up logic in ErrorHandler
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7228 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
42db64bbb3
commit
605bfa5bc5
1 changed files with 9 additions and 12 deletions
|
@ -98,19 +98,16 @@ class ErrorHandler extends Object {
|
||||||
$method = 'error';
|
$method = 'error';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($method == 'error') {
|
if ($method !== 'error') {
|
||||||
$this->dispatchMethod($method, $messages);
|
if (Configure::read() == 0){
|
||||||
$this->_stop();
|
$method = 'error404';
|
||||||
} elseif (Configure::read() == 0 && (isset($code) && $code == 500)) {
|
if(isset($code) && $code == 500) {
|
||||||
$this->dispatchMethod('error500', $messages);
|
$method = 'error500';
|
||||||
exit();
|
}
|
||||||
} elseif (Configure::read() == 0) {
|
}
|
||||||
$this->dispatchMethod('error404', $messages);
|
|
||||||
$this->_stop();
|
|
||||||
} else {
|
|
||||||
$this->dispatchMethod($method, $messages);
|
|
||||||
$this->_stop();
|
|
||||||
}
|
}
|
||||||
|
$this->dispatchMethod($method, $messages);
|
||||||
|
$this->_stop();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Displays an error page (e.g. 404 Not found).
|
* Displays an error page (e.g. 404 Not found).
|
||||||
|
|
Loading…
Reference in a new issue