[wp-trac] [WordPress Trac] #52814: Avoid notices in `get_post_comments_feed_link()`

WordPress Trac noreply at wordpress.org
Tue Jun 8 21:05:40 UTC 2021


#52814: Avoid notices in `get_post_comments_feed_link()`
-------------------------------------------------+-------------------------
 Reporter:  dd32                                 |       Owner:
                                                 |  SergeyBiryukov
     Type:  defect (bug)                         |      Status:  reviewing
 Priority:  low                                  |   Milestone:  5.8
Component:  Feeds                                |     Version:
 Severity:  trivial                              |  Resolution:
 Keywords:  has-patch has-unit-tests has-        |     Focuses:
  testing-info commit                            |
-------------------------------------------------+-------------------------
Changes (by hellofromTonya):

 * keywords:  has-patch has-unit-tests has-testing-info => has-patch has-
     unit-tests has-testing-info commit


Comment:

 Marking for `commit`.

 A few enhancements to Dion's patch:

 - Unit test added
 - Checks for the instance of `WP_Post` which is the expected data type if
 the post exists
 - Retains the return signature of string data type for backwards
 compatibility, documentation, etc by returning an empty string if the post
 does not exist

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


More information about the wp-trac mailing list