Skip to content

Commit

Permalink
Moving error handler configuration setting after application bootstra…
Browse files Browse the repository at this point in the history
…p is done, this will allow classes to be imported using the cache.
  • Loading branch information
markstory committed Nov 26, 2010
1 parent e68a1a0 commit b371de8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cake/libs/configure.php
Expand Up @@ -368,18 +368,18 @@ private static function __loadBootstrap($boot) {
}
}

App::init();
App::build();
if (!include(CONFIGS . 'bootstrap.php')) {
trigger_error(sprintf(__("Can't find application bootstrap file. Please create %sbootstrap.php, and make sure it is readable by PHP."), CONFIGS), E_USER_ERROR);
}

if (!empty(self::$_values['Error']['handler'])) {
set_error_handler(self::$_values['Error']['handler']);
}
if (!empty(self::$_values['Exception']['handler'])) {
set_exception_handler(self::$_values['Exception']['handler']);
}

App::init();
App::build();
if (!include(CONFIGS . 'bootstrap.php')) {
trigger_error(sprintf(__("Can't find application bootstrap file. Please create %sbootstrap.php, and make sure it is readable by PHP."), CONFIGS), E_USER_ERROR);
}
}
}
}
}

0 comments on commit b371de8

Please sign in to comment.