Title: Warning in comment-template.php
Last modified: August 30, 2016

---

# Warning in comment-template.php

 *  Resolved [ccert](https://wordpress.org/support/users/ccert/)
 * (@ccert)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/warning-in-comment-templatephp/)
 * Dear Forum members,
 * Recently my web hosting provider changed there server. After that i am getting
   following error on my website’s (careercert.info) HOME page:-
 * > Warning: Creating default object from empty value in /home/careerce/public_html/
   > wp-includes/comment-template.php on line 920
 * I checked comment-template.php file and line 920 says this :-
 * `$comment->comment_type = 'comment';`
 * I have no idea about this, so please help me with this warning message.
 * Thanks a lot.

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/warning-in-comment-templatephp/#post-6799241)
 * One of more of the core files may have been corrupted by the move.
 * Try [downloading WordPress](https://wordpress.org/download/) again and delete
   then replace your copies of everything **except** the `wp-config.php` file and
   the `/wp-content/` directory with fresh copies from the download. This will effectively
   replace all of your core files without damaging your content and settings. Some
   uploaders tend to be unreliable when overwriting files, so don’t forget to delete
   the original files before replacing them.
 *  Thread Starter [ccert](https://wordpress.org/support/users/ccert/)
 * (@ccert)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/warning-in-comment-templatephp/#post-6799333)
 * Thanks a lot james, i will definitely do this.
    could there be any shortcut method
   to resolve my problem ? I’m not very comfortable with manually deleting all the
   files.
 * ..
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/warning-in-comment-templatephp/#post-6799334)
 * No, this is the only way to guarantee that you don’t have corrupt core files.
 *  Thread Starter [ccert](https://wordpress.org/support/users/ccert/)
 * (@ccert)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/warning-in-comment-templatephp/#post-6799337)
 * Alright, i deleted all wordpress files except the wp-config.php file and the /
   wp-content/ directory and then uploaded new files via FTP.
 * Still same problem !! 🙁
 * The warning message only shows up on HOME page ! why so ?
 * ..
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/warning-in-comment-templatephp/#post-6799339)
 * What happens if you replace the text on the home page with some dummy text?
 *  Thread Starter [ccert](https://wordpress.org/support/users/ccert/)
 * (@ccert)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/warning-in-comment-templatephp/#post-6799362)
 * Already tried that, still showing same warning message.
 * Disabled all plug-ins, no result either.
 * Could it be a theme related problem ?
 * ..
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/warning-in-comment-templatephp/#post-6799364)
 * Possibly, do you still have the same error if you switch to the Twenty Fifteen
   them?
 *  Thread Starter [ccert](https://wordpress.org/support/users/ccert/)
 * (@ccert)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/warning-in-comment-templatephp/#post-6799393)
 * okay, finally changed the theme to twenty fourteen. Should let go the old theme
   earlier.
 * All is well now.
 * ..
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/warning-in-comment-templatephp/#post-6799395)
 * Excellent. 🙂

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Warning in comment-template.php’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 3 participants
 * Last reply from: [James Huff](https://wordpress.org/support/users/macmanx/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/warning-in-comment-templatephp/#post-6799395)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
