From 2a016da3520bb9bd13e636b2c6be922ea4bfefb0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 26 May 2020 13:29:41 +0200 Subject: [PATCH] Guard ENTERPRISE_MODE_DOMAIN_OVERRIDE functionality against PHP_SAPI !== 'cli' --- .../files/lib/data/application/Application.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/data/application/Application.class.php b/wcfsetup/install/files/lib/data/application/Application.class.php index 0a6ec2658a..3b492c848b 100644 --- a/wcfsetup/install/files/lib/data/application/Application.class.php +++ b/wcfsetup/install/files/lib/data/application/Application.class.php @@ -70,9 +70,11 @@ class Application extends DatabaseObject { * @inheritDoc */ public function __get($name) { - if (ENABLE_ENTERPRISE_MODE && defined('ENTERPRISE_MODE_DOMAIN_OVERRIDE') && ENTERPRISE_MODE_DOMAIN_OVERRIDE === $_SERVER['HTTP_HOST']) { - if ($name === 'cookieDomain' || $name === 'domainName') { - return ENTERPRISE_MODE_DOMAIN_OVERRIDE; + if (ENABLE_ENTERPRISE_MODE && defined('ENTERPRISE_MODE_DOMAIN_OVERRIDE') && PHP_SAPI !== 'cli') { + if (ENTERPRISE_MODE_DOMAIN_OVERRIDE === $_SERVER['HTTP_HOST']) { + if ($name === 'cookieDomain' || $name === 'domainName') { + return ENTERPRISE_MODE_DOMAIN_OVERRIDE; + } } } -- 2.20.1