[wp-trac] [WordPress Trac] #51416: PHP Warning during sitemap generation

WordPress Trac noreply at wordpress.org
Tue Oct 13 15:02:41 UTC 2020


#51416: PHP Warning during sitemap generation
--------------------------+-----------------------------
 Reporter:  dd32          |       Owner:  SergeyBiryukov
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  5.6
Component:  Sitemaps      |     Version:
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------------
Changes (by SergeyBiryukov):

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


Comment:

 In [changeset:"49137" 49137]:
 {{{
 #!CommitTicketReference repository="" revision="49137"
 Sitemaps: Check the result of `get_term_link()` when collecting the URLs
 in `WP_Sitemaps_Taxonomies::get_url_list()`.

 This avoids a PHP warning during sitemap generation if `get_term_link()`
 returns an error, e.g. due to term ID being shared between multiple
 taxonomies.

 Additionally, pass the `$taxonomy` argument to `get_term_link()` to
 properly disambiguate the call.

 Props dd32.
 Fixes #51416.
 }}}

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


More information about the wp-trac mailing list