Title: Fatal error upon comment post
Last modified: October 1, 2016

---

# Fatal error upon comment post

 *  [jersey-peeps](https://wordpress.org/support/users/jersey-peeps/)
 * (@jersey-peeps)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/fatal-error-upon-comment-post/)
 * Hi, I’m currently running a social website where users need to leave comments,
   but upon doing so they get the following error
 * Fatal error: Class ‘W3TC\stdClass’ not found in /home/jerseype/public_html/wp-
   content/plugins/w3-total-cache/Util_PageUrls.php on line 527

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

 *  [tselatyjr](https://wordpress.org/support/users/tselatyjr/)
 * (@tselatyjr)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/fatal-error-upon-comment-post/#post-8241630)
 * The fix is:
 * Open this file: /wp-content/plugins/w3-total-cache/Util_PageUrls.php
 * Change line 527 from:
    $GLOBALS[‘post’] = new stdClass();
 * To this:
    $GLOBALS[‘post’] = new \stdClass();
 * It has to deal with a namespacing issue. I hope the plugin developers see this.
 * -Tim
 *  [Scott Hartley](https://wordpress.org/support/users/destac/)
 * (@destac)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/fatal-error-upon-comment-post/#post-8241866)
 * ^ Also make sure to be running a php version greater than 5.2 to avoid other 
   errors \0
 *  [Protoss](https://wordpress.org/support/users/protoss/)
 * (@protoss)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/fatal-error-upon-comment-post/#post-8244641)
 * thx tselaty jr, that resolve the issue that begun with 0.9.5
 *  [Patrik](https://wordpress.org/support/users/patschi/)
 * (@patschi)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-upon-comment-post/#post-8492386)
 * Had the exact same error with PHP 5.6 right now. Posting comments was not possible.
   The above code fixed it – working fine again. Wondering why this fix isn’t in
   the latest update yet…

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

The topic ‘Fatal error upon comment post’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 4 replies
 * 5 participants
 * Last reply from: [Patrik](https://wordpress.org/support/users/patschi/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-upon-comment-post/#post-8492386)
 * Status: not resolved