From 501cf4930a93e322cafb38ecd6449e40db58cf33 Mon Sep 17 00:00:00 2001 From: Joerg Date: Sun, 14 Apr 2024 18:10:07 +0200 Subject: [PATCH] docker-env needs to be defined --- index.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index 320627e22..113a57805 100644 --- a/index.php +++ b/index.php @@ -84,14 +84,19 @@ switch (ENVIRONMENT) ini_set('display_errors', 1); break; + case 'docker': + ini_set('display_errors', 0); + if (version_compare(PHP_VERSION, '5.3', '>=')) { + error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); + } else { + error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE); + } + case 'production': ini_set('display_errors', 0); - if (version_compare(PHP_VERSION, '5.3', '>=')) - { + if (version_compare(PHP_VERSION, '5.3', '>=')) { error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); - } - else - { + } else { error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE); } break;