[wp-trac] [WordPress Trac] #29660: Functions in wp_includes/query.php assume non-null return value from get_queried_object
WordPress Trac
noreply at wordpress.org
Fri Aug 26 10:13:25 UTC 2016
#29660: Functions in wp_includes/query.php assume non-null return value from
get_queried_object
--------------------------+-----------------------------
Reporter: yellyc | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Query | Version: 4.0
Severity: normal | Resolution:
Keywords: 2nd-opinion | Focuses:
--------------------------+-----------------------------
Comment (by mikejolley):
Hey, I was pointed to this ticket from
https://github.com/woothemes/woocommerce/issues/11778
Seeing as the codex states that conditional functions should work after
''posts_selection'', I shouldn't need to worry about notices being thrown
when using is_singular during template_redirect hook.
At the very least, the code should check it's dealing with objects to
avoid notices.
disclaimer; not looked too deep at the code yet, just adding that this is
indeed a bug.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29660#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list