Guard ENTERPRISE_MODE_DOMAIN_OVERRIDE functionality against PHP_SAPI !== 'cli'
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 26 May 2020 11:29:41 +0000 (13:29 +0200)
committerTim Düsterhus <timwolla@googlemail.com>
Tue, 26 May 2020 19:03:39 +0000 (21:03 +0200)
wcfsetup/install/files/lib/data/application/Application.class.php

index 0a6ec2658a1db891bef5403060b77f20c5b52255..3b492c848b7e1757fea7dd8d76808c02694e42f5 100644 (file)
@@ -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;
+                               }
                        }
                }