Move inclusion of application bootstrap behind ErrorHandler initialization in Configure::bootstrap().

This commit is contained in:
Thomas Ploch 2012-03-08 16:00:09 +01:00
parent a4da64cacb
commit 7a93276ecf

View file

@ -75,9 +75,6 @@ class Configure {
App::$bootstrapping = false; App::$bootstrapping = false;
App::init(); App::init();
App::build(); App::build();
if (!include APP . 'Config' . DS . 'bootstrap.php') {
trigger_error(__d('cake_dev', "Can't find application bootstrap file. Please create %sbootstrap.php, and make sure it is readable by PHP.", APP . 'Config' . DS), E_USER_ERROR);
}
$level = -1; $level = -1;
if (isset(self::$_values['Error']['level'])) { if (isset(self::$_values['Error']['level'])) {
error_reporting(self::$_values['Error']['level']); error_reporting(self::$_values['Error']['level']);
@ -89,6 +86,9 @@ class Configure {
if (!empty(self::$_values['Exception']['handler'])) { if (!empty(self::$_values['Exception']['handler'])) {
set_exception_handler(self::$_values['Exception']['handler']); set_exception_handler(self::$_values['Exception']['handler']);
} }
if (!include APP . 'Config' . DS . 'bootstrap.php') {
trigger_error(__d('cake_dev', "Can't find application bootstrap file. Please create %sbootstrap.php, and make sure it is readable by PHP.", APP . 'Config' . DS), E_USER_ERROR);
}
} }
} }