• Resolved jbotte

    (@jbotte)


    when running wp_debug log i notice that we get an error showing that is_search is checked even though there is no query… would it make sense to determine if there is a query first to prevent error?

    example screenshot of potential fix to controller-frontend.php

    of note i forgot to include in screenshot that we should be adding global $wp_query below the global $wpdb;

    • This topic was modified 6 years, 1 month ago by jbotte.
    • This topic was modified 6 years, 1 month ago by jbotte.
Viewing 1 replies (of 1 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    I’m not sure that this is the best way to get rid of this log notice. Wouldn’t it make more sense to try and find out why there is no $wp_query? After all, that part of the code is only run when a Shortcode is evaluated, and it’s run from a filter hook handler that is actually inside the WP_Query class (see here)…

    Regards,
    Tobias

Viewing 1 replies (of 1 total)
  • The topic ‘is_search when there is no query’ is closed to new replies.