[wp-trac] Re: [WordPress Trac] #6953: get_post() returns bogus
object for non-existing post IDs
WordPress Trac
wp-trac at lists.automattic.com
Tue Jun 10 18:19:39 GMT 2008
#6953: get_post() returns bogus object for non-existing post IDs
---------------------------------------+------------------------------------
Reporter: Sam_a | Owner: ryan
Type: defect | Status: new
Priority: normal | Milestone: 2.7
Component: General | Version: 2.5.1
Severity: normal | Resolution:
Keywords: get_post has-patch tested |
---------------------------------------+------------------------------------
Changes (by Sam_a):
* keywords: get_post has-patch needs-testing => get_post has-patch
tested
Comment:
Attached 6953.patch fixes the problem in 2.5.1 and trunk.
For non-existing post IDs, get_post() now returns `&$null` immediately and
doesn't call _get_post_ancestors(), wp_cache_add().
--
Ticket URL: <http://trac.wordpress.org/ticket/6953#comment:3>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list