From 213cfe528516b2d61e9210d0b59e7d55e2ce3038 Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Thu, 13 Aug 2020 01:47:14 +0000 Subject: [PATCH] [COMMAND] Fix 'bin/console doctrine:database:create' by only loading defaults if we have a connection --- src/Core/GNUsocial.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Core/GNUsocial.php b/src/Core/GNUsocial.php index ba7ccae99f..f6ab5d67d4 100644 --- a/src/Core/GNUsocial.php +++ b/src/Core/GNUsocial.php @@ -132,7 +132,9 @@ class GNUsocial implements EventSubscriberInterface Mailer::setMailer($this->mailer); Router::setRouter($this->router, $this->url_generator); - DefaultSettings::setDefaults(); + if (isset($_ENV['HTTPS']) || isset($_ENV['HTTP_HOST'])) { + DefaultSettings::setDefaults(); + } Cache::setupCache();