Title: comment-template.php on line 1142PHP message: PHP Warning
Last modified: June 26, 2023

---

# comment-template.php on line 1142PHP message: PHP Warning

 *  [ecommonist](https://wordpress.org/support/users/ecommonist/)
 * (@ecommonist)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/comment-template-php-on-line-1142php-message-php-warning/)
 * 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)

 *  [Benedikt Ledl](https://wordpress.org/support/users/benniledl/)
 * (@benniledl)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/comment-template-php-on-line-1142php-message-php-warning/#post-16848489)
 * 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://wordpress.org/documentation/article/debugging-in-wordpress/](https://wordpress.org/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](https://wordpress.org/support/users/ecommonist/)
 * (@ecommonist)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/comment-template-php-on-line-1142php-message-php-warning/#post-16851456)
 * 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:
 *     ```wp-block-code
               return apply_filters( 'get_comment_type', $comment->comment_type, $comment->comment_ID, $comment );
       ```
   
 *  [Benedikt Ledl](https://wordpress.org/support/users/benniledl/)
 * (@benniledl)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/comment-template-php-on-line-1142php-message-php-warning/#post-16851479)
 * 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](https://wordpress.org/support/users/ecommonist/)
 * (@ecommonist)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/comment-template-php-on-line-1142php-message-php-warning/#post-16854535)
 * I’d never expected a response like that one… 🙁
 * ok
 *  [Benedikt Ledl](https://wordpress.org/support/users/benniledl/)
 * (@benniledl)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/comment-template-php-on-line-1142php-message-php-warning/#post-16854543)
 * 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.

## Tags

 * [warning](https://wordpress.org/support/topic-tag/warning/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [Benedikt Ledl](https://wordpress.org/support/users/benniledl/)
 * Last activity: [2 years, 11 months ago](https://wordpress.org/support/topic/comment-template-php-on-line-1142php-message-php-warning/#post-16854543)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
