Skip to content

Commit 21dc39f

Browse files
committed
Rename alt_sources variable
1 parent b71e3a4 commit 21dc39f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/SPC/command/DownloadCommand.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,11 @@ public function handle(): int
245245
// if download failed, we will try to download alternative sources
246246
logger()->warning("Download failed: {$e->getMessage()}");
247247
logger()->notice("Trying to download alternative sources for {$source}");
248-
$alt_sources = Config::getSource($source);
249-
if (!isset($alt_sources['alt'])) {
248+
$alt_sources = Config::getSource($source)['alt'] ?? null;
249+
if ($alt_sources === null) {
250250
$alt_config = array_merge($config, $this->getDefaultAlternativeSource($source));
251251
} else {
252-
$alt_config = array_merge($config, $alt_sources['alt']);
252+
$alt_config = array_merge($config, $alt_sources);
253253
}
254254
Downloader::downloadSource($source, $alt_config, $force_all || in_array($source, $force_list));
255255
}

0 commit comments

Comments
 (0)