[wp-trac] [WordPress Trac] #37738: WP_Post::get_instance returns erroneous data for invalid input such as an array or object instead of false.
WordPress Trac
noreply at wordpress.org
Fri Aug 26 18:38:25 UTC 2016
#37738: WP_Post::get_instance returns erroneous data for invalid input such as an
array or object instead of false.
--------------------------------------+------------------
Reporter: deeptiboddapati | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.7
Component: Posts, Post Types | Version: 3.5
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+------------------
Changes (by boonebgorges):
* milestone: Awaiting Review => 4.7
Comment:
@deeptiboddapati Thank you for the patch and for the tests!
It seems incorrect to me that `1.4` should be rounded down to `1`. That
may be how things currently work, but it definitely feels wrong. I assume
that backward compatibility will be covered by ensuring that `get_post(
1.0 )` does match post `1` (but not `get_post( 1.5 )`)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37738#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list