mirror of
https://github.com/flarum/framework.git
synced 2024-11-30 05:13:37 +08:00
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:
parent
99c47271be
commit
f332f5bfe4
|
@ -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 (
|
||||
|
|
Loading…
Reference in New Issue
Block a user