• Resolved Megunticook

    (@megunticook)


    I noticed in my nginx error log a warning that’s getting repeated over and over:

    PHP message: PHP Warning:  Parameter 2 to set_query_to_draft() expected to be a reference, value given in /usr/share/nginx/html/wp-includes/class-wp-hook.php on line 286" while reading response header from upstream, client: 172.31.4.3, $
    2019/07/27 00:31:27 [error] 2889#2889: *224551 FastCGI sent in stderr: "PHP message: PHP Warning:  Parameter 2 to set_query_to_draft() expected to be a reference, value given in /usr/share/nginx/html/wp-includes/class-wp-hook.php on lin$

    I found that line 286 which is in the “apply_filters” function:

    $value = call_user_func_array( $the_['function'], $args );

    Is this error telling me there’s a bad plugin or bad function in my theme’s functions.php file? How do I identify the culprit?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator James Huff

    (@macmanx)

    This may be a plugin or theme conflict. Please attempt to disable all plugins, and switch to the default Twenty Nineteen theme. If the problem goes away, enable them one by one to identify the source of the problem.

    If you can install plugins, install Health Check. On the troubleshooting tab, you can click the button to disable all plugins and change the theme for you, while you’re still logged in, without affecting normal visitors to your site.

    Thread Starter Megunticook

    (@megunticook)

    I think I may have found the culprit, a custom function in functions.php. Thanks for your advice.

    • This reply was modified 6 years, 10 months ago by Megunticook.
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP warning–what is the issue?’ is closed to new replies.