From 7ba218e4647291d70d53981fd1c4ea0c0e299bbd Mon Sep 17 00:00:00 2001 From: Tac Tacelosky Date: Sun, 28 Jan 2024 11:45:14 -0600 Subject: [PATCH] avoid error if version source isn't set fixes #101 --- src/Packagist/Api/Result/Factory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Packagist/Api/Result/Factory.php b/src/Packagist/Api/Result/Factory.php index 70787ff..da59913 100644 --- a/src/Packagist/Api/Result/Factory.php +++ b/src/Packagist/Api/Result/Factory.php @@ -148,7 +148,7 @@ public function createPackageResults(array $package): Package } } - if ($version['source']) { + if ($version['source']??false) { $version['source'] = $this->createResult(PackageSource::class, $version['source']); }