Permalink
Browse files

Fix fatal error when E_STRICT is enabled.

If you have E_STRICT enabled and have a strict error in your files, you
would see a fatal error related to Debugger missing.  PHP won't autoload
classes if you are currently in an autoload call, and an error is
triggered.  Preloading Debugger + String in dev mode lets you see the
correct error.
  • Loading branch information...
1 parent db7d542 commit 35e0984bec41b019b1a5e8da9877fe472103ff25 @markstory markstory committed Jun 24, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/Cake/Core/Configure.php
@@ -98,7 +98,12 @@ public static function bootstrap($boot = true) {
self::$_values['Error'],
self::$_values['Exception']
);
- unset($error, $exception);
+
+ // Preload Debugger + String in case of E_STRICT errors when loading files.
+ if (self::$_values['debug'] > 0) {
+ class_exists('Debugger');
+ class_exists('String');
+ }
}
}

0 comments on commit 35e0984

Please sign in to comment.