[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
Wed Apr 8 17:48:24 UTC 2020
#29660: Functions in wp_includes/query.php assume non-null return value from
get_queried_object
--------------------------+-----------------------------
Reporter: yellyc | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Query | Version: 4.0
Severity: normal | Resolution:
Keywords: 2nd-opinion | Focuses:
--------------------------+-----------------------------
Comment (by datainterlock):
{{{
[08-Apr-2020 14:48:45 UTC] PHP Notice: Trying to get property of non-
object in {path}/wp-includes/class-wp-query.php on line 3998
[08-Apr-2020 14:48:45 UTC] PHP Notice: Trying to get property of non-
object in {path}/wp-includes/class-wp-query.php on line 4000
[08-Apr-2020 14:48:45 UTC] PHP Notice: Trying to get property of non-
object in {path}/wp-includes/class-wp-query.php on line 4002
}}}
6 years... and counting.
It would be nice if you guys could at least squelch these error log
entries yourself until you decide how you're going to deal with it.
Returning a null {{{get_queried_object()}}} to a function that demands an
object {{{is_page()}}} just cost me the entire day only to discover that
the solution is to stuff a sock in WP's mouth.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29660#comment:32>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list