Skip to content

Commit 4b1d5f6

Browse files
committed
Require more than one .
So we still support normal .0 releases
1 parent 2d9f395 commit 4b1d5f6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Core_Command.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1349,7 +1349,8 @@ private function get_download_url( $version, $locale = 'en_US', $file_type = 'zi
13491349

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

0 commit comments

Comments
 (0)