[wp-trac] [WordPress Trac] #33118: Don't assume the $post is an array in sanitize_post().
WordPress Trac
noreply at wordpress.org
Sun Sep 13 15:14:15 UTC 2015
#33118: Don't assume the $post is an array in sanitize_post().
-----------------------------------+-----------------------------
Reporter: morganestes | Owner: wonderboymusic
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.4
Component: Posts, Post Types | Version: 2.5
Severity: normal | Resolution: fixed
Keywords: has-patch 2nd-opinion | Focuses:
-----------------------------------+-----------------------------
Comment (by morganestes):
Replying to [comment:5 kitchin]:
> Seems to me there should be an `else $post = null` if this is a
sanitization function.
I don't think completely changing the expected return type by nullifying
it is the way to go here, but I could see throwing a 'doing_it_wrong'
early if fails a type check.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33118#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list