[wp-trac] [WordPress Trac] #33068: get_post() returning current object if 0
WordPress Trac
noreply at wordpress.org
Thu Dec 3 15:59:59 UTC 2020
#33068: get_post() returning current object if 0
---------------------------------------+---------------------
Reporter: Rahe | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.7
Component: Posts, Post Types | Version: 3.5
Severity: normal | Resolution:
Keywords: needs-testing 2nd-opinion | Focuses:
---------------------------------------+---------------------
Comment (by Rahe):
Hello,
For me passing an integer is wanting to get this specific ID.
Post `0` doesn't exists and maybe post `56743` too.
Based on this behaviour, `get_post` on `56743` should return current post
too.
The current behaviour for `0` is not logic for me.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33068#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list