[wp-trac] [WordPress Trac] #21607: post_exists returns 0 and null
WordPress Trac
wp-trac at lists.automattic.com
Thu Aug 16 12:12:52 UTC 2012
#21607: post_exists returns 0 and null
--------------------------+-----------------------------
Reporter: barrykooij | Owner: barrykooij
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.4.1
Severity: normal | Keywords: has-patch
--------------------------+-----------------------------
The function ''post_exists'', located in ''wp-admin/includes/post.php'',
returns ''0'' if the arguments are empty but returns ''null'' if the query
has no result. Because of this the output of the function can't be
strictly checked (===).
Changed the ''0'' return to ''null''.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21607>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list