[wp-trac] [WordPress Trac] #62097: MO-Translation: Undefinied Array-Key
WordPress Trac
noreply at wordpress.org
Mon Sep 23 09:36:31 UTC 2024
#62097: MO-Translation: Undefinied Array-Key
-------------------------------+-----------------------------
Reporter: marcusthierfelder | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 6.6.2
Severity: normal | Keywords:
Focuses: |
-------------------------------+-----------------------------
In the file wp-includes/l10n/class-wp-translation-file-mo.php in line 161,
the following error occurs under certain circumstances:
“PHP message: PHP Warning: Undefined array key 1 in /wp-includes/l10n
/class-wp-translation-file-mo.php on line 161”.
The error can be corrected by the following adjustment:
{{{#!php
list( $name, $value ) = array_map( 'trim', array_pad(explode( ':',
$meta_line, 2 ), 2, '' ));
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62097>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list