From e232b797530165eb1997a3b6df900fdfa84a75f1 Mon Sep 17 00:00:00 2001 From: William Pinaud Date: Fri, 6 Sep 2024 13:09:51 +0200 Subject: [PATCH] Update SiteInstallCommands.php (#6101) Just a quick win to save the bummer of a fatal error, cause ::get can return `null`, which `is_dir` doesn't like at all. --- src/Commands/core/SiteInstallCommands.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Commands/core/SiteInstallCommands.php b/src/Commands/core/SiteInstallCommands.php index 8e0e122fbe..b0a2b13262 100644 --- a/src/Commands/core/SiteInstallCommands.php +++ b/src/Commands/core/SiteInstallCommands.php @@ -98,7 +98,7 @@ public function install(array $recipeOrProfile, $options = ['db-url' => self::RE // Was giving error during validate() so its here for now. if ($options['existing-config']) { $existing_config_dir = Settings::get('config_sync_directory'); - if (!is_dir($existing_config_dir)) { + if ($existing_config_dir === null || !is_dir($existing_config_dir)) { throw new \Exception(dt('Existing config directory @dir not found', ['@dir' => $existing_config_dir])); } $this->logger()->info(dt('Installing from existing config at @dir', ['@dir' => $existing_config_dir]));