Docker-readiness

This commit is contained in:
Joerg
2024-04-14 17:43:49 +02:00
parent 0a675736ae
commit 3197544ccc
3 changed files with 24 additions and 15 deletions

View File

@@ -54,7 +54,9 @@
* NOTE: If you change these, also change the error_reporting() code below
*/
#define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development');
if (file_exists('.debug')) {
if (isset($_SERVER['CI_ENV'])) {
define('ENVIRONMENT', $_SERVER['CI_ENV']) {
elseif (file_exists('.debug')) {
define('ENVIRONMENT', 'development');
} else if (file_exists('.maintenance')) {
define('ENVIRONMENT', 'maintenance');
@@ -81,7 +83,7 @@ switch (ENVIRONMENT)
error_reporting(-1);
ini_set('display_errors', 1);
break;
case 'production':
ini_set('display_errors', 0);
if (version_compare(PHP_VERSION, '5.3', '>='))