Skip to content

Commit

Permalink
Update SiteInstallCommands.php (#6101)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DocFX committed Sep 6, 2024
1 parent 94328fe commit e232b79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Commands/core/SiteInstallCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]));
Expand Down

0 comments on commit e232b79

Please sign in to comment.