Skip to content

Commit

Permalink
On prod it won't display any PHP errors
Browse files Browse the repository at this point in the history
As suggested by PHP Manual
  • Loading branch information
slawkens committed Dec 29, 2020
1 parent ad3694e commit c55e291
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.php
Expand Up @@ -56,11 +56,17 @@
require_once BASE . 'config.local.php';
}

ini_set('log_errors', 1);
if(config('env') === 'dev') {
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
}
else {
ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
}

if((!isset($config['installed']) || !$config['installed']) && file_exists(BASE . 'install'))
{
Expand Down

0 comments on commit c55e291

Please sign in to comment.