Explorar el Código

Check we have a driver before using it

Jordi Boggiano hace 13 años
padre
commit
22a93e7273
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      src/Composer/Repository/VcsRepository.php

+ 4 - 0
src/Composer/Repository/VcsRepository.php

@@ -43,6 +43,10 @@ class VcsRepository extends ArrayRepository
             }
         }
 
+        if (!$driver) {
+            throw new \InvalidArgumentException('No driver found to handle VCS repository '.$this->url);
+        }
+
         $versionParser = new VersionParser;
         $loader = new ArrayLoader($this->repositoryManager);
         $versions = array();