Skip to content

Commit

Permalink
chore: allow debug mode freedom of configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
SychO9 committed Oct 17, 2024
1 parent 296b58e commit 41b2b1c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions framework/core/src/Foundation/Site.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ public static function fromPaths(array $paths): SiteInterface

$config = static::loadConfig($paths->base);

if (function_exists('error_reporting')) {
error_reporting($config->inDebugMode() ? E_ALL : E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED);
}
if (! $config->inDebugMode()) {
ini_set('display_errors', 0);

ini_set('display_errors', $config->inDebugMode() ? 1 : 0);
if (function_exists('error_reporting')) {
error_reporting(E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED);
}
}

return (
new InstalledSite($paths, $config)
Expand Down

0 comments on commit 41b2b1c

Please sign in to comment.