[wp-trac] [WordPress Trac] #41745: Uncaught Error in get_query_var when $wp_query is null
WordPress Trac
noreply at wordpress.org
Tue Sep 5 03:42:37 UTC 2017
#41745: Uncaught Error in get_query_var when $wp_query is null
--------------------------+------------------------------
Reporter: kbjohnson90 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: 4.8.1
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+------------------------------
Comment (by dlh):
Replying to [comment:1 johnbillion]:
> WordPress core doesn't use exceptions, so this error is probably coming
from a plugin or theme on your site.
It looks like there are a few exceptions in core. For example:
-
https://github.com/WordPress/WordPress/blob/0860bb2771ea82a37c08e8cb7ce54989ebf4c6f2
/wp-includes/customize/class-wp-customize-custom-css-setting.php#L68
-
https://github.com/WordPress/WordPress/blob/0860bb2771ea82a37c08e8cb7ce54989ebf4c6f2
/wp-includes/customize/class-wp-customize-nav-menu-setting.php#L137
-
https://github.com/WordPress/WordPress/blob/28eda6f4bc141182625d9627967b28c65302318c
/wp-includes/functions.php#L3025
Is there an official core policy about exceptions? I didn't see one in
https://make.wordpress.org/core/handbook/best-practices/coding-
standards/php/.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41745#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list