Skip to content

Commit

Permalink
Make code more reliable
Browse files Browse the repository at this point in the history
  • Loading branch information
villfa authored and theseer committed Jan 27, 2022
1 parent 45a4f6f commit 7f7f5fb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/services/phar/InstallService.php
Expand Up @@ -80,8 +80,7 @@ private function getInstalledVersionConstraint(VersionConstraint $requestedVersi
return $requestedVersionConstraint;
}

/** @var int $major */
$major = $installedVersion->getMajor()->getValue();
$major = $installedVersion->getMajor()->getValue() ?? 0;

return new AndVersionConstraintGroup(
sprintf('^%s', $installedVersion->getVersionString()),
Expand Down

0 comments on commit 7f7f5fb

Please sign in to comment.