1
0
Fork 0

Ignore empty refs

pull/2993/merge
Jordi Boggiano 2014-04-11 13:58:47 +02:00
parent 97873a27af
commit 39c8d3e6e1
1 changed files with 3 additions and 1 deletions

View File

@ -21,7 +21,9 @@ class ComposerMirror
{
public static function processUrl($mirrorUrl, $packageName, $version, $reference, $type)
{
$reference = preg_match('{^([a-f0-9]*|%reference%)$}', $reference) ? $reference : md5($reference);
if ($reference) {
$reference = preg_match('{^([a-f0-9]*|%reference%)$}', $reference) ? $reference : md5($reference);
}
$version = strpos($version, '/') === false ? $version : md5($version);
return str_replace(