Log database errors instead of showing them.

display_errors is off unless DISPLAY_ERRORS is set in .env.
This commit is contained in:
tim
2026-09-25 21:57:11 +02:00
parent bcba2e1ca3
commit f97bdecbc1
9 changed files with 40 additions and 16 deletions
+4
View File
@@ -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'));
?>