From fd8b414c5f8f64f64c2a328b33ff6aeb9eb1f464 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Mon, 26 Sep 2022 20:56:10 +0000 Subject: [PATCH] i18n: Ensure empty strings are consistently translated to `''`. This changeset fixes an edge case where empty strings were wrongly translated to `'0'` (falsey value) instead of `''` (empty string). Props Chouby, manooweb, rafiahmedd, lopo. Fixes #55941. Built from https://develop.svn.wordpress.org/trunk@54315 git-svn-id: http://core.svn.wordpress.org/trunk@53874 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pomo/entry.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/pomo/entry.php b/wp-includes/pomo/entry.php index 97ffe46b7b..983f1d4113 100644 --- a/wp-includes/pomo/entry.php +++ b/wp-includes/pomo/entry.php @@ -87,10 +87,10 @@ if ( ! class_exists( 'Translation_Entry', false ) ) : /** * Generates a unique key for this entry. * - * @return string|false The key or false if the entry is empty. + * @return string|false The key or false if the entry is null. */ public function key() { - if ( null === $this->singular || '' === $this->singular ) { + if ( null === $this->singular ) { return false; } diff --git a/wp-includes/version.php b/wp-includes/version.php index f35abb145b..21fcf61917 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-beta1-54314'; +$wp_version = '6.1-beta1-54315'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.