• php 8.1, nginx, bedrock roots, wp 6.2.2

    I’ve been trying to notify this error for two years… with no success ??

    I would like to know what is happening here and why I’m the only one just suffering this. I’ve tested with a new installation and disabling some plugins. Jetpack guys told me is a core thing, so here we are. I received this warning on every page load. Every one of them.

    wp-includes/comment-template.php on line 1142PHP message: PHP Warning: Attempt to read property “comment_ID” on null

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    this warning hasn’t got anything to do with your server.

    This messages are warnings for developers and are only shown when the WordPress debug mode is activated. There is an article on how to activate the debug mode, you need to do the same thing but instead of defining WP_DEBUG as true you must set it to false. https://www.ads-software.com/documentation/article/debugging-in-wordpress/

    If this doesn’t help can you please double check your WordPress version and the error message? In WordPress 6.2.2 this warning cannot occur on line 1142 of this file.

    Thread Starter ecommonist

    (@ecommonist)

    Hi

    I expressed wrong, this warning is on access.log by nginx, server is on production mode, so no warnings on the frontend.

    1142 on 6.2.2. line is, so its related clearly to that warning:

            return apply_filters( 'get_comment_type', $comment->comment_type, $comment->comment_ID, $comment );
    

    Hi, since there is nothing displayed on the frontend you have got no problem.

    Warnings are not errors, you can ignore warnings.

    Thread Starter ecommonist

    (@ecommonist)

    I’d never expected a response like that one… ??

    ok

    Hi,

    warnings are just for developers to notice that their code is sloppy, they do not result in any problems. You as a user do not need to worry about warnings. You only see these warnings since you do “developer stuff” (looking into debug logs)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘comment-template.php on line 1142PHP message: PHP Warning’ is closed to new replies.