Opened 2 years ago
Closed 2 years ago
#62097 closed defect (bug) (duplicate)
MO-Translation: Undefinied Array-Key
| Reported by: | marcusthierfelder | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | I18N | Version: | 6.6.2 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
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:
list( $name, $value ) = array_map( 'trim', array_pad(explode( ':', $meta_line, 2 ), 2, '' ));
Change History (2)
This ticket was mentioned in PR #7419 on WordPress/wordpress-develop by @narenin.
2 years ago
#1
- Keywords has-patch added
#2
@
2 years ago
- Component General → I18N
- Milestone Awaiting Review
- Resolution → duplicate
- Status new → closed
Hi there and welcome to Trac!
Thanks for the detailed report & patch.
If you encounter this issue, it means one of your plugins has a faulty MO file.
This issue was previously identified and fixed in #61794 and will be in WordPress 6.7.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Trac ticket: https://core.trac.wordpress.org/ticket/62097