[wp-trac] [WordPress Trac] #61690: wp_calculate_image_srcset triggers warnings when WP_CONTENT_URL is a relative URL

WordPress Trac noreply at wordpress.org
Sat Jul 20 13:31:09 UTC 2024


#61690: wp_calculate_image_srcset triggers warnings when WP_CONTENT_URL is a
relative URL
--------------------------+-----------------------------
 Reporter:  mattraines    |       Owner:  SergeyBiryukov
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  6.7
Component:  Upload        |     Version:  6.6
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------------
Changes (by SergeyBiryukov):

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


Comment:

 In [changeset:"58773" 58773]:
 {{{
 #!CommitTicketReference repository="" revision="58773"
 Media: Check if content URL includes a hostname in
 `wp_calculate_image_srcset()`.

 This resolves an `Undefined array key "host"` PHP warning if
 `WP_CONTENT_URL` is set to a relative URL.

 Follow-up to [58097].

 Props mattraines, narenin, pamprn, SergeyBiryukov.
 Fixes #61690.
 }}}

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


More information about the wp-trac mailing list