[wp-trac] [WordPress Trac] #49145: Undefined index: host in/wp-includes/l10n.php on line 989, suggested fix

WordPress Trac noreply at wordpress.org
Mon Oct 5 23:54:02 UTC 2020


#49145: Undefined index: host in/wp-includes/l10n.php on line 989, suggested fix
----------------------------------------+-----------------------------
 Reporter:  SeBsZ                       |       Owner:  SergeyBiryukov
     Type:  defect (bug)                |      Status:  reviewing
 Priority:  normal                      |   Milestone:  5.6
Component:  I18N                        |     Version:  5.3.2
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+-----------------------------

Comment (by nourma):

 Replying to [comment:15 justinahinon]:
 > The initial patch proposed by Sergey still needs a look.
 > @nourma proposed to work on it during yesterday's i18n bug scrub.
 >
 > And I can write the unit tests when ready.
 I am unable to duplicate the undefined index in `l10n.php`. When I use
 `wp_make_link_relative` to filter `site_url` to make URLs relative,  I get
 undefined indexes in `theme.php`(lines 3479 & 3544), `class-wp-customize-
 manager.php`(line 4598), and` http.php`(lines 421 and 422). In each case,
 a function is trying to access `$admin_origin['host']`, which has no
 `host` index. On a side note, I was able to successfully apply the patch
 49145.diff (but obviously was unable to test that it actually solved the
 problem, since I was unable to replicate the error in `l10n.php`). I
 applied the patch on the latest build WordPress 5.6.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49145#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list