From 7c33159a38a898fec2ffecce2325c575d2e12640 Mon Sep 17 00:00:00 2001 From: jekkos-t520 Date: Sat, 7 Mar 2020 15:21:20 +0100 Subject: [PATCH] Fix config.php in testing mode --- application/config/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/config/config.php b/application/config/config.php index e10ca199b..ff873a9c0 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -66,7 +66,7 @@ $config['db_log_enabled'] = FALSE; | */ $config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_ENV['FORCE_HTTPS']) && $_ENV['FORCE_HTTPS'] == 'true')) ? 'https' : 'http'; -$config['base_url'] .= '://' . ((ENVIRONMENT == "testing") ? 'localhost' : $_SERVER['HTTP_HOST']) ; +$config['base_url'] .= '://' . ((isset($_SERVER['HTTP_HOST'])) ? $_SERVER['HTTP_HOST'] : 'localhost') ; $config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']); /*