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
This commit is contained in:
audrasjb 2022-09-26 20:56:10 +00:00
parent 457f15283a
commit fd8b414c5f
2 changed files with 3 additions and 3 deletions

View File

@ -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;
}

View File

@ -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.