From: Tim Düsterhus Date: Tue, 26 May 2020 11:29:41 +0000 (+0200) Subject: Guard ENTERPRISE_MODE_DOMAIN_OVERRIDE functionality against PHP_SAPI !== 'cli' X-Git-Tag: 5.2.7~38 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2a016da3520bb9bd13e636b2c6be922ea4bfefb0;p=GitHub%2FWoltLab%2FWCF.git Guard ENTERPRISE_MODE_DOMAIN_OVERRIDE functionality against PHP_SAPI !== 'cli' --- 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; + } } }