From 3427bee1f2b50fbe108c3fe81b8ba9b9fae2d960 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 10 Jan 2024 13:47:26 +0100 Subject: [PATCH] :facepalm: --- src/Composer/DependencyResolver/LockTransaction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/DependencyResolver/LockTransaction.php b/src/Composer/DependencyResolver/LockTransaction.php index d5ff59135..70603b867 100644 --- a/src/Composer/DependencyResolver/LockTransaction.php +++ b/src/Composer/DependencyResolver/LockTransaction.php @@ -113,7 +113,7 @@ class LockTransaction extends Transaction if ($presentPackage->getSourceReference() && $presentPackage->getSourceType() === $package->getSourceType()) { $package->setSourceDistReferences($presentPackage->getSourceReference()); // if the dist url is not one of those handled gracefully by setSourceDistReferences then we should overwrite it with the old one - if (!Preg::isMatch('{^https?://(?:(?:www\.)?bitbucket\.org|(api\.)?github\.com|(?:www\.)?gitlab\.com)/}i', $package->getDistUrl())) { + if ($package->getDistUrl() !== null && !Preg::isMatch('{^https?://(?:(?:www\.)?bitbucket\.org|(api\.)?github\.com|(?:www\.)?gitlab\.com)/}i', $package->getDistUrl())) { $package->setDistUrl($presentPackage->getDistUrl()); } $package->setDistType($presentPackage->getDistType());