Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removing coercion of error methods into error404 as its generally not…

… helpful to have errors converted into error404. Fixes #538
  • Loading branch information...
commit fdd8a51a07458231864870f6eff4c34d0ff5afe6 1 parent e6f9c42
@markstory markstory authored
Showing with 6 additions and 8 deletions.
  1. +6 −8 cake/console/error.php
View
14 cake/console/error.php
@@ -51,11 +51,7 @@ class ErrorHandler extends Object {
function __construct($method, $messages) {
$this->stdout = fopen('php://stdout', 'w');
$this->stderr = fopen('php://stderr', 'w');
- if (Configure::read() > 0 || $method == 'error') {
- call_user_func_array(array(&$this, $method), $messages);
- } else {
- call_user_func_array(array(&$this, 'error404'), $messages);
- }
+ call_user_func_array(array(&$this, $method), $messages);
}
/**
@@ -78,9 +74,11 @@ function error($params) {
*/
function error404($params) {
extract($params, EXTR_OVERWRITE);
- $this->error(array('code' => '404',
- 'name' => 'Not found',
- 'message' => sprintf(__("The requested address %s was not found on this server.", true), $url, $message)));
+ $this->error(array(
+ 'code' => '404',
+ 'name' => 'Not found',
+ 'message' => sprintf(__("The requested address %s was not found on this server.", true), $url, $message)
+ ));
$this->_stop();
}
Please sign in to comment.
Something went wrong with that request. Please try again.