Title: Syntax error
Last modified: May 12, 2021

---

# Syntax error

 *  Resolved [bowoolley](https://wordpress.org/support/users/bowoolley/)
 * (@bowoolley)
 * [5 years ago](https://wordpress.org/support/topic/syntax-error-211/)
 * Hi – I got an alert from Wordfence, and yes, the plugin is causing a serious 
   error on the site. I was trying to add a new page when I got this error:
 * syntax error, unexpected ‘const’ (T_CONST), expecting variable (T_VARIABLE) in/
   home/customer/www/MYWEBSITE/public_html/wp-content/plugins/magic-post-thumbnail/
   inc/monolog/vendor/monolog/monolog/src/Monolog/Logger.php on line 33
 * Can someone look into it? I updated the plugin after getting the Wordfence email,
   and the error is still there.
 * Edit: the email was from WordPress, the built-in error detector, not Wordfence.
    -  This topic was modified 5 years ago by [bowoolley](https://wordpress.org/support/users/bowoolley/).
    -  This topic was modified 5 years ago by [bowoolley](https://wordpress.org/support/users/bowoolley/).

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

 *  Plugin Author [Alexandre Gaboriau](https://wordpress.org/support/users/mcurly/)
 * (@mcurly)
 * [5 years ago](https://wordpress.org/support/topic/syntax-error-211/#post-14431358)
 * Hi,
 * This is weird, nothing has been changed into this folder since the last update,
   and I don’t have this error.
    Monolog is a known script used to creates logs (
   cf [https://github.com/Seldaek/monolog](https://github.com/Seldaek/monolog))
 * Can you tell me which PHP version is installed on your server?
    Also, can you
   tell me if logs are enabled (MPT > Settings > Logs > “Enable Logs”) ? If yes,
   can you try to disable it and tell me if you have the same error or not?
 * Thanks a lot
 *  Thread Starter [bowoolley](https://wordpress.org/support/users/bowoolley/)
 * (@bowoolley)
 * [5 years ago](https://wordpress.org/support/topic/syntax-error-211/#post-14435515)
 * Hello – I had to contact my hosting company, as the PHP version was different
   in the WordPress dashboard from the one indicated on my hosting dashboard. There
   was apparently an Apache handler specifying PHP 7.0 on the site. He changed it,
   it’s now running 7.3 and the error with your plugin seems to have disappeared.
   🙂
 *  Plugin Author [Alexandre Gaboriau](https://wordpress.org/support/users/mcurly/)
 * (@mcurly)
 * [5 years ago](https://wordpress.org/support/topic/syntax-error-211/#post-14436274)
 * Glad to hear that!
    And that’s a good point that you migrate your hosting to 
   PHP 7.3. There is better WordPress performance under php 7.3 than 7.0.
    -  This reply was modified 5 years ago by [Alexandre Gaboriau](https://wordpress.org/support/users/mcurly/).

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

The topic ‘Syntax error’ is closed to new replies.

 * ![](https://ps.w.org/magic-post-thumbnail/assets/icon-256x256.png?rev=3183991)
 * [Generate Images (AI) - Magic Post Thumbnail](https://wordpress.org/plugins/magic-post-thumbnail/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/magic-post-thumbnail/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/magic-post-thumbnail/)
 * [Active Topics](https://wordpress.org/support/plugin/magic-post-thumbnail/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/magic-post-thumbnail/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/magic-post-thumbnail/reviews/)

## Tags

 * [site broken](https://wordpress.org/support/topic-tag/site-broken/)
 * [syntax error](https://wordpress.org/support/topic-tag/syntax-error/)

 * 3 replies
 * 2 participants
 * Last reply from: [Alexandre Gaboriau](https://wordpress.org/support/users/mcurly/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/syntax-error-211/#post-14436274)
 * Status: resolved