소스 검색

Do not send an empty list of packages to the default policy, fixes #1259

Jordi Boggiano 12 년 전
부모
커밋
711179b2b4
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Composer/Installer.php

+ 1 - 1
src/Composer/Installer.php

@@ -449,7 +449,7 @@ class Installer
                     }
 
                     // select prefered package according to policy rules
-                    if ($matches = $policy->selectPreferedPackages($pool, array(), $matches)) {
+                    if ($matches && $matches = $policy->selectPreferedPackages($pool, array(), $matches)) {
                         $newPackage = $pool->literalToPackage($matches[0]);
 
                         if ($newPackage && $newPackage->getSourceReference() !== $package->getSourceReference()) {