From 22a93e7273a5462aed5b2546314002c91bc7e1d9 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 15 Nov 2011 11:54:26 +0100 Subject: [PATCH] Check we have a driver before using it --- src/Composer/Repository/VcsRepository.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Composer/Repository/VcsRepository.php b/src/Composer/Repository/VcsRepository.php index ff17e5342..5b5c4a8d4 100644 --- a/src/Composer/Repository/VcsRepository.php +++ b/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();