From a00173629800683976228f6c18556c1d7503e27d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Klabbers?= Date: Wed, 30 Sep 2020 21:38:19 +0200 Subject: [PATCH] Mark keys for Config required only with InstalledSite (#2323) * use fallback on url to prevent errors in cli during install. The value of the fallback doesn't actually matter, we just need something. --- src/Foundation/Site.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Foundation/Site.php b/src/Foundation/Site.php index c77868467..973214212 100644 --- a/src/Foundation/Site.php +++ b/src/Foundation/Site.php @@ -25,7 +25,12 @@ class Site date_default_timezone_set('UTC'); if (! static::hasConfigFile($paths->base)) { - return new UninstalledSite($paths, $_SERVER['REQUEST_URI']); + // Instantiate site instance for new installations, + // fallback to localhost for validation of Config for instance in CLI. + return new UninstalledSite( + $paths, + Arr::get($_SERVER, 'REQUEST_URI', 'http://localhost') + ); } return (