From 6312e6c50a874f75390246575e635132c59f8b31 Mon Sep 17 00:00:00 2001 From: Uladzimir Tsykun Date: Wed, 27 Sep 2023 13:08:00 +0200 Subject: [PATCH] Fix PHP exception when reference does not exist --- src/Service/DistManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Service/DistManager.php b/src/Service/DistManager.php index 086a8611..f92aa407 100644 --- a/src/Service/DistManager.php +++ b/src/Service/DistManager.php @@ -197,7 +197,7 @@ private function downloadVCS(string $reference, Package $package, ?string $versi $format = $this->config->getArchiveFormat(); $targetDir = $this->config->generateTargetDir($package->getName()); - $fileName = $this->config->getFileName($reference, $versionName); + $fileName = $this->config->getFileName($reference, $versionName ?: self::EMPTY_VERSION_NAME); try { if ($path = $archiveManager->tryFromGitArchive($reference, $format, $targetDir, $fileName)) {