[wp-trac] [WordPress Trac] #53262: wp_robots() (via wp_die) triggers a "doing_it_wrong_trigger_error", but should not.
WordPress Trac
noreply at wordpress.org
Mon Nov 1 15:26:54 UTC 2021
#53262: wp_robots() (via wp_die) triggers a "doing_it_wrong_trigger_error", but
should not.
--------------------------+------------------------------
Reporter: juliobox | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 5.7
Severity: minor | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by lkraav):
I can confirm, this is a real bug. In my case, a 3rd party plugin crashes
real early, on `plugins_loaded` action.
Resulting stack trace
{{{
ErrorException: User Notice: is_search was called
<strong>incorrectly</strong>. Conditional query tags do not work before
the query is run. Before then, they always return false. Please see <a
href="https://wordpress.org/support/article/debugging-in-
wordpress/">Debugging in WordPress</a> for more information. (This message
was added in version 3.1.0.)
#11 /wp-includes/functions.php(5663): _doing_it_wrong
#10 /wp-includes/query.php(699): is_search
#9 /wp-includes/robots-template.php(119): wp_robots_noindex_search
#8 /wp-includes/class-wp-hook.php(303): WP_Hook::apply_filters
#7 /wp-includes/plugin.php(189): apply_filters
#6 /wp-includes/robots-template.php(32): wp_robots
#5 /wp-includes/functions.php(3675): _default_wp_die_handler
#4 /wp-includes/functions.php(3599): wp_die
#3 /wp-includes/class-wp-fatal-error-handler.php(233):
WP_Fatal_Error_Handler::display_default_error_template
#2 /wp-includes/class-wp-fatal-error-handler.php(152):
WP_Fatal_Error_Handler::display_error_template
#1 /wp-includes/class-wp-fatal-error-handler.php(57):
WP_Fatal_Error_Handler::handle
#0 [internal](0): null
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53262#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list