From 7e56087e4681e2d8f006754c86758e6d4604e9b8 Mon Sep 17 00:00:00 2001 From: "E. S" Date: Mon, 28 Apr 2025 15:06:15 +0300 Subject: [PATCH] init: fix setting isDevelopmentEnvironment in GlobalContext --- src/init.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/init.php b/src/init.php index 40b782a..88c63c3 100644 --- a/src/init.php +++ b/src/init.php @@ -33,10 +33,9 @@ $globalContext = engine\GlobalContext::getInstance(); try { if (isCli()) { - if (str_ends_with(__DIR__, 'www-dev')) - $globalContext->setIsDevelopmentEnvironment(true); $_SERVER['HTTP_HOST'] = $config['domain']; $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; + $globalContext->setIsDevelopmentEnvironment(str_ends_with(dirname(__DIR__), 'www-dev')); } else { // IE moment if (($pos = strpos($_SERVER['HTTP_HOST'], ':')) !== false)