From 80c6793ef7bb45bcd9269d08bd0c7ff978d95e9b Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Thu, 17 Mar 2016 16:49:12 +0100 Subject: [PATCH] Fix getting the latest version when the `available` property is not set --- system/src/Grav/Console/Gpm/InstallCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/src/Grav/Console/Gpm/InstallCommand.php b/system/src/Grav/Console/Gpm/InstallCommand.php index 3cb0bd37c..00e6402bc 100644 --- a/system/src/Grav/Console/Gpm/InstallCommand.php +++ b/system/src/Grav/Console/Gpm/InstallCommand.php @@ -233,7 +233,7 @@ class InstallCommand extends ConsoleCommand { $helper = $this->getHelper('question'); $package_name = $package->name; - $new_version = $package->available; + $new_version = $package->available ? $package->available : $this->gpm->getLatestVersionOfPackage($package->slug); $old_version = $package->version; $major_version_changed = explode('.', $new_version)[0] !== explode('.', $old_version)[0];