Make WordPress Core


Ignore:
Timestamp:
09/26/2022 08:54:44 PM (2 years ago)
Author:
audrasjb
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/pomo/entry.php

    r54133 r54315  
    8888         * Generates a unique key for this entry.
    8989         *
    90          * @return string|false The key or false if the entry is empty.
     90         * @return string|false The key or false if the entry is null.
    9191         */
    9292        public function key() {
    93             if ( null === $this->singular || '' === $this->singular ) {
     93            if ( null === $this->singular ) {
    9494                return false;
    9595            }
Note: See TracChangeset for help on using the changeset viewer.