Opened 6 years ago
Closed 6 years ago
#45256 closed defect (bug) (fixed)
Undefined index: path in load_script_textdomain function
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.0 | Priority: | normal |
Severity: | normal | Version: | 5.0 |
Component: | I18N | Keywords: | has-patch fixed-5.0 |
Focuses: | Cc: |
Description
I will report an error message when using the wp_set_scrianslations function in the development environment.
Notice: Undefined index: path in <b>.../htdocs/wp-includes/l10n.php on line 928
This error occurrence point is as follows.
( strpos( $site_url['path'], $src_url['path'] ) === 0 ) &&
This is because the 'path' key does not exist in variable $site_url if site_url is 'http: localhost'.
I think it is necessary to determine whether the 'path' key exists in the variable $site_url before the strpos function.
Change History (7)
#1
@
6 years ago
- Component changed from General to I18N
- Milestone changed from Awaiting Review to 5.0
- Version set to 5.0
#3
@
6 years ago
- Owner set to herregroen
- Resolution set to fixed
- Status changed from new to closed
In 43898:
#4
@
6 years ago
- Keywords has-patch fixed-5.0 added
- Resolution fixed deleted
- Status changed from closed to reopened
#5
@
6 years ago
Sign off for the patch was given here:
https://core.trac.wordpress.org/ticket/45103#comment:32
#6
@
6 years ago
Seems to still be an issue: https://github.com/WordPress/gutenberg/issues/12670
Note: See
TracTickets for help on using
tickets.
https://core.trac.wordpress.org/attachment/ticket/45103/45103.11.diff resolved this for me in my testing just now.