Browse Source

Merge pull request #4441 from cakephp/3.0-better-fatal-handling

3.0 - Do not hinder fatal error causes when debug = false.
Mark Story 11 years ago
parent
commit
ce62b1fb9a
1 changed files with 2 additions and 6 deletions
  1. 2 6
      src/Error/BaseErrorHandler.php

+ 2 - 6
src/Error/BaseErrorHandler.php

@@ -17,8 +17,8 @@ namespace Cake\Error;
 use Cake\Core\Configure;
 use Cake\Error\Debugger;
 use Cake\Log\Log;
-use Cake\Routing\Router;
 use Cake\Network\Exception\InternalErrorException;
+use Cake\Routing\Router;
 
 /**
  * Base error handler that provides logic common to the CLI + web
@@ -185,11 +185,7 @@ abstract class BaseErrorHandler {
 		];
 		$this->_logError(LOG_ERR, $data);
 
-		if (Configure::read('debug')) {
-			$this->handleException(new FatalErrorException($description, 500, $file, $line));
-			return true;
-		}
-		$this->handleException(new InternalErrorException());
+		$this->handleException(new FatalErrorException($description, 500, $file, $line));
 		return true;
 	}