[wp-trac] [WordPress Trac] #28310: Accessing properties of null returned from get_post()

WordPress Trac noreply at wordpress.org
Fri Aug 1 18:39:24 UTC 2014


#28310: Accessing properties of null returned from get_post()
-------------------------------------------+-----------------------------
 Reporter:  GaryJ                          |       Owner:  wonderboymusic
     Type:  defect (bug)                   |      Status:  closed
 Priority:  normal                         |   Milestone:  4.0
Component:  Posts, Post Types              |     Version:  trunk
 Severity:  normal                         |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests punt  |     Focuses:
-------------------------------------------+-----------------------------
Changes (by wonderboymusic):

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


Comment:

 In [changeset:"29344"]:
 {{{
 #!CommitTicketReference repository="" revision="29344"
 Clarify that `get_the_date()`, `get_the_time()`, `get_post_time()` and
 `get_post_modified_time()` should return `false` when `get_post()` is
 `null`.

 Adds unit tests.

 Props GaryJ, SergeyBiryukov, tollmanz.
 Fixes #28310.
 }}}

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


More information about the wp-trac mailing list