[wp-trac] [WordPress Trac] #47733: Undefined index HTTP_HOST in wp-includes/ms-settings.php on line 57

WordPress Trac noreply at wordpress.org
Wed May 7 19:45:48 UTC 2025


#47733: Undefined index HTTP_HOST in wp-includes/ms-settings.php on line 57
------------------------------------+-----------------------------
 Reporter:  JochenT                 |       Owner:  SergeyBiryukov
     Type:  defect (bug)            |      Status:  closed
 Priority:  normal                  |   Milestone:  6.9
Component:  Bootstrap/Load          |     Version:  5.2.2
 Severity:  minor                   |  Resolution:  fixed
 Keywords:  has-patch dev-feedback  |     Focuses:  multisite
------------------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"60226" 60226]:
 {{{
 #!CommitTicketReference repository="" revision="60226"
 Bootstrap/Load: Check if `HTTP_HOST` is defined when determining the
 current site.

 This avoids a PHP warning when running cron via CLI on Multisite:
 {{{
 Warning: Undefined array key "HTTP_HOST" in wp-includes/ms-settings.php on
 line 62
 }}}

 Follow-up to [https://mu.trac.wordpress.org/changeset/11 mu:11],
 [https://mu.trac.wordpress.org/changeset/423 mu:423],
 [https://mu.trac.wordpress.org/changeset/543 mu:543], [12602], [27359].

 Props Mte90, JochenT, walterebert, elialum, SergeyBiryukov.
 Fixes #47733.
 }}}

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


More information about the wp-trac mailing list