1
0
Fork 0

Updated VersionGuesser to check if we actually have a version in the returned array (fixes bug originating from f6899e5 when array was first introduced) - as SVN Versions not being guessed as it would previously stop at Git check.

Fixes #6178
pull/6174/merge
James Buncle 2017-02-17 16:07:08 +00:00 committed by Jordi Boggiano
parent 1baa2a52d4
commit 9be13783a3
1 changed files with 3 additions and 3 deletions

View File

@ -65,17 +65,17 @@ class VersionGuesser
{
if (function_exists('proc_open')) {
$versionData = $this->guessGitVersion($packageConfig, $path);
if (null !== $versionData) {
if (null !== $versionData && null !== $versionData['version']) {
return $versionData;
}
$versionData = $this->guessHgVersion($packageConfig, $path);
if (null !== $versionData) {
if (null !== $versionData && null !== $versionData['version']) {
return $versionData;
}
$versionData = $this->guessFossilVersion($packageConfig, $path);
if (null !== $versionData) {
if (null !== $versionData && null !== $versionData['version']) {
return $versionData;
}