From 27acf5d8b646cee2bbca9ddaa21107ca3d9e5678 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 18 Jul 2025 12:59:31 +0000 Subject: [PATCH] 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 --- wp-includes/l10n/class-wp-translations.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/l10n/class-wp-translations.php b/wp-includes/l10n/class-wp-translations.php index e177e1d8c5..e919fea8b9 100644 --- a/wp-includes/l10n/class-wp-translations.php +++ b/wp-includes/l10n/class-wp-translations.php @@ -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 ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 438f886723..2130dc4cf2 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.