diff --git a/src/Composer/Repository/ArrayRepository.php b/src/Composer/Repository/ArrayRepository.php index 815bc0087..3d9e22d14 100644 --- a/src/Composer/Repository/ArrayRepository.php +++ b/src/Composer/Repository/ArrayRepository.php @@ -122,7 +122,8 @@ class ArrayRepository extends BaseRepository */ public function hasPackage(PackageInterface $package) { - if (empty($this->packageMap)) { + if ($this->packageMap === null) { + $this->packageMap = array(); foreach ($this->getPackages() as $repoPackage) { $this->packageMap[$repoPackage->getUniqueName()] = $repoPackage; }