[wp-trac] [WordPress Trac] #62366: get_post_states() throws PHP warning
WordPress Trac
noreply at wordpress.org
Sat Nov 9 15:31:30 UTC 2024
#62366: get_post_states() throws PHP warning
-------------------------+-------------------------------------------------
Reporter: akramipro | Owner: (none)
Type: defect | Status: new
(bug) |
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post | Version: trunk
Types |
Severity: normal | Resolution:
Keywords: has-patch | Focuses: coding-standards, php-
close | compatibility
-------------------------+-------------------------------------------------
Changes (by knutsp):
* keywords: has-patch => has-patch close
Comment:
Since the cause for this must be that the function is called without the
correct varibale type, then this does not fix anyting, just hides an
error. This function rightously assumes $post as a WP_Post.
It shuld be rectified in the calling code.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62366#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list