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.
This commit is contained in:
Daniël Klabbers 2020-09-30 21:38:19 +02:00 committed by GitHub
parent 99c47271be
commit f332f5bfe4

View File

@ -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 (