diff --git a/index.php b/index.php index 7144ae27..f23d8441 100644 --- a/index.php +++ b/index.php @@ -25,8 +25,10 @@ set_error_handler(function ($code, $message, $file, $line) { // Deprecation messages and other masked errors are typically ignored here return false; } - // In the future, uncomment this: - //throw new \ErrorException($message, 0, $code, $file, $line); + if (Debug::isEnabled()) { + // This might be annoying, but it's for the greater good + throw new \ErrorException($message, 0, $code, $file, $line); + } $text = sprintf( '%s at %s line %s', sanitize_root($message),