Log database errors instead of showing them.
display_errors is off unless DISPLAY_ERRORS is set in .env.
This commit is contained in:
@@ -39,4 +39,8 @@ function config($key, $default = NULL) {
|
||||
|
||||
return array_key_exists($key, $values) ? $values[$key] : $default;
|
||||
}
|
||||
|
||||
// Always log PHP errors; show them only if DISPLAY_ERRORS is set (for development)
|
||||
ini_set('log_errors', '1');
|
||||
ini_set('display_errors', (string)config('DISPLAY_ERRORS', '0'));
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user