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

WordPress Trac noreply at wordpress.org
Mon May 19 22:56:28 UTC 2014


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

 * keywords:   => has-patch
 * milestone:  Awaiting Review => 4.0


Comment:

 [source:tags/3.9.1/src/wp-includes/general-template.php#L867
 single_post_title()] and [source:tags/3.9.1/src/wp-includes/general-
 template.php#L984 single_term_title()] do verify if they have a valid
 object to work with, and I think it makes sense to follow the pattern
 here.

 [attachment:28310.2.diff] also synchronizes parameter docs between
 `get_post_time()` and `get_post_modified_time()`.

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


More information about the wp-trac mailing list