diff --git a/src/Composer/Repository/PearRepository.php b/src/Composer/Repository/PearRepository.php index 7d947fda4..cf07a3cc6 100644 --- a/src/Composer/Repository/PearRepository.php +++ b/src/Composer/Repository/PearRepository.php @@ -24,6 +24,9 @@ class PearRepository extends ArrayRepository public function __construct(array $config) { + if (!preg_match('{^https?://}', $config['url'])) { + $config['url'] = 'http://'.$config['url']; + } if (!filter_var($config['url'], FILTER_VALIDATE_URL)) { throw new \UnexpectedValueException('Invalid url given for PEAR repository: '.$config['url']); }