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:
gwoo 2008-06-21 15:35:17 +00:00
parent 42db64bbb3
commit 605bfa5bc5

View file

@ -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).