Title: self::class syntax error
Last modified: September 20, 2017

---

# self::class syntax error

 *  Resolved [sgadsby](https://wordpress.org/support/users/sgadsby/)
 * (@sgadsby)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/selfclass-syntax-error/)
 * We updated WordPress to 4.8.2 and the site died with this error:
 * > PHP Parse error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier(
   > T_STRING) or variable (T_VARIABLE) or ‘{‘ or ‘$’ in /home/user/public_html/
   > user/wp-content/plugins/sermon-manager-for-wordpress/includes/class-sm-dates-
   > wp.php on line 42
 * If I comment out the following line then the site is fine:
 * `add_filter( 'get_the_date', array( self::class, 'get_the_date' ), 10, 3 );`
 * Updated to the most recent sermon manager plugin and problem remains.
 * Any ideas?

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

 *  Thread Starter [sgadsby](https://wordpress.org/support/users/sgadsby/)
 * (@sgadsby)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/selfclass-syntax-error/#post-9515548)
 * Actually it appears that it was updating the sermon-manager plugin that killed
   it, not the wordpress update.
 * Looks like there may be a bug in the sermon-manager code in class-sm-dates-wp.
   php?
 *  [Nikola](https://wordpress.org/support/users/nikolam/)
 * (@nikolam)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/selfclass-syntax-error/#post-9516705)
 * Hey [@sgadsby](https://wordpress.org/support/users/sgadsby/),
 * Can you please update to the latest Sermon Manager release (2.6.1), the bug should
   be fixed. 🙂
 * If you can’t access admin area of your website, please do the following:
    1. 
   Connect to your website via FTP or cPanel file manager 2. Navigate to `(public_html/)
   wp-content/plugins/` 3. Delete directory `sermon-manager-for-wordpress` 4. Site
   will work now, please install latest version Note: No sermons will be lost by
   doing these steps
 * Thank you for your patience and understanding. 🙂
 *  Thread Starter [sgadsby](https://wordpress.org/support/users/sgadsby/)
 * (@sgadsby)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/selfclass-syntax-error/#post-9519586)
 * Yep that fixes it, thanks Nikola!

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

The topic ‘self::class syntax error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/sermon-manager-for-wordpress_688896.
   svg)
 * [Sermon Manager](https://wordpress.org/plugins/sermon-manager-for-wordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sermon-manager-for-wordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sermon-manager-for-wordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/sermon-manager-for-wordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sermon-manager-for-wordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sermon-manager-for-wordpress/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [sgadsby](https://wordpress.org/support/users/sgadsby/)
 * Last activity: [8 years, 6 months ago](https://wordpress.org/support/topic/selfclass-syntax-error/#post-9519586)
 * Status: resolved