diff --git a/src/Cli/FrameworkCommands.php b/src/Cli/FrameworkCommands.php index c43856e0..25582ae4 100644 --- a/src/Cli/FrameworkCommands.php +++ b/src/Cli/FrameworkCommands.php @@ -80,7 +80,7 @@ public function cliCosUpdate($cli = 'wp') $versions_file_path = "$work_dir/wpcli/Dockerfile"; $version_file_contents = file_get_contents($versions_file_path); $version = $this->getCosWpCliVersion($version_file_contents); - + $updated_version = ''; $next_version = $this->nextWpVersionThatExists($version); if (!$next_version) { @@ -299,7 +299,7 @@ protected function nextWpVersionThatExists($current_version) // If our versions do not match, check that the latest version exists before continuing. // Greater than comparision to ensure that we don't get older versions. See https://github.com/pantheon-systems/cos-framework-clis/pull/76#issuecomment-1118650316 - if ($latest_version > $current_version) { + if (version_compare($latest_version, $current_version, '>')) { $try_version = $this->wpVersionExists($latest_version); if (!empty($try_version)) {