Make WordPress Core


Ignore:
Timestamp:
01/23/2024 03:13:32 PM (2 years ago)
Author:
swissspidy
Message:

I18N: Improve edge case handling in WP_Translation_Controller.

Prevents PHP warnings for possibly undefined array keys.
Also fixes incorrect @covers annotations.

Follow-up to [57337].
See #59656.

File:
1 edited

Legend:

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

    r57338 r57339  
    822822        array_unshift(
    823823            $translation_files,
    824             substr_replace( $mofile, ".l10n.$preferred_format", - strlen( $preferred_format ) )
     824            substr_replace( $mofile, ".l10n.$preferred_format", - strlen( '.mo' ) )
    825825        );
    826826    }
Note: See TracChangeset for help on using the changeset viewer.