Skip to content

Commit

Permalink
Require more than one .
Browse files Browse the repository at this point in the history
So we still support normal .0 releases
  • Loading branch information
mrsdizzie committed Dec 18, 2024
1 parent 2d9f395 commit 4b1d5f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Core_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,8 @@ private function get_download_url( $version, $locale = 'en_US', $file_type = 'zi

$locale_subdomain = 'en_US' === $locale ? '' : substr( $locale, 0, 2 ) . '.';
$locale_suffix = 'en_US' === $locale ? '' : "-{$locale}";
if ( substr( $version, -2 ) === '.0' ) {
// Match 6.7.0 but not 6.0
if ( substr_count( $version, '.' ) > 1 && substr( $version, -2 ) === '.0' ) {
$version = substr( $version, 0, -2 );
}

Expand Down

0 comments on commit 4b1d5f6

Please # to comment.