Opened 4 years ago
Closed 4 years ago
#46387 closed defect (bug) (fixed)
Undefined index notice in wp-includes/l10n.php on line 950
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.3 | Priority: | normal |
Severity: | normal | Version: | 5.0 |
Component: | I18N | Keywords: | has-patch |
Focuses: | Cc: |
Description
If WP_CONTENT_URL
is set to a root path e.g. http://example.com
not http://example.com/wp-content
(Which boilerplate frameworks like Bedrock & WordPlate do), the return object from wp_parse_url
doesn't include a path value.
Adding a check if path is set in load_script_textdomain
after wp_parse_url
would solve this issue:
// Added to wp-includes/l10n.php, line 947
if ( empty( $content_url['path'] ) ) {
$content_url['path'] = '/';
}
Related to these issues:
https://github.com/WordPress/gutenberg/issues/12670
https://github.com/wordplate/wordplate/issues/221
Attachments (3)
Change History (12)
#4
@
4 years ago
- Keywords has-patch added
- Version set to trunk
Added a check if $content_urlpath? exists.
This should solve issues when content_url() returns no paths.
Please use 46387.3.diff, previous 2 are empty
#5
@
4 years ago
I had this issue on a local site using localhost url. I applied https://core.trac.wordpress.org/attachment/ticket/46387/46387.3.diff from @odminstudios The notice was no longer present after applying patch.
#46672 was marked as a duplicate.