[wp-trac] [WordPress Trac] #45256: Undefined index: path in load_script_textdomain function
WordPress Trac
noreply at wordpress.org
Fri Nov 2 02:19:00 UTC 2018
#45256: Undefined index: path in load_script_textdomain function
--------------------------+-----------------------------
Reporter: tmatsuur | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45256>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list