I18N: Correct strict comparison in WP_Translations::translate_plural().

This ensures that the `$count` value is compared as an integer to account for plugins or themes passing a numeric string instead.

Follow-up to [57337].

Props dd32, mukesh27, swissspidy, pmbaldha, SergeyBiryukov.
Fixes #63642.
Built from https://develop.svn.wordpress.org/trunk@60484


git-svn-id: http://core.svn.wordpress.org/trunk@59820 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2025-07-18 12:59:31 +00:00
parent d00545bd40
commit 27acf5d8b6
2 changed files with 2 additions and 2 deletions

View File

@@ -124,7 +124,7 @@ class WP_Translations {
}
// Fall back to the original with English grammar rules.
return ( 1 === $count ? $singular : $plural );
return ( 1 === (int) $count ? $singular : $plural );
}
/**

View File

@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.9-alpha-60483';
$wp_version = '6.9-alpha-60484';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.