Skip to content

Commit

Permalink
'v' in version breaks version_compare()
Browse files Browse the repository at this point in the history
  • Loading branch information
terion-name committed Aug 4, 2014
1 parent f2c402a commit a1f5308
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Terion/PackageInstaller/PackageInstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ protected function getLatestStable(Package $package)
}
}
usort($stableVersions, function ($a, $b) {
return (version_compare($a, $b, '<')) ? 1 : -1;
return (version_compare(ltrim($a, 'v'), ltrim($b, 'v'), '<')) ? 1 : -1;
});
if (count($stableVersions) > 0) {
$version = array_shift($stableVersions);
Expand Down

0 comments on commit a1f5308

Please sign in to comment.