[wp-trac] [WordPress Trac] #46387: Undefined index notice in wp-includes/l10n.php on line 950
WordPress Trac
noreply at wordpress.org
Fri Mar 1 11:17:42 UTC 2019
#46387: Undefined index notice in wp-includes/l10n.php on line 950
--------------------------+-----------------------------
Reporter: tditlu | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Cron API | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
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:
{{{#!php
// 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]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46387>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list