1
0
Fork 0

Consider 0 as part of a version

pull/4096/head
Rob Bast 2015-06-02 14:11:31 +02:00
parent a256f3dfca
commit a0ca1d4d96
1 changed files with 5 additions and 1 deletions

View File

@ -416,7 +416,11 @@ class VersionParser
$lowVersion = $this->normalize($matches['from']);
$lowerBound = new VersionConstraint('>=', $lowVersion . $lowStabilitySuffix);
if ((!empty($matches[11]) && !empty($matches[12])) || !empty($matches[14]) || !empty($matches[16])) {
$empty = function ($x) {
return ($x === 0 || $x === "0") ? false : empty($x);
};
if ((!$empty($matches[11]) && !$empty($matches[12])) || !empty($matches[14]) || !empty($matches[16])) {
$highVersion = $this->normalize($matches['to']);
$upperBound = new VersionConstraint('<=', $highVersion);
} else {