• Resolved bowoolley

    (@bowoolley)


    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 3 years, 10 months ago by bowoolley.
    • This topic was modified 3 years, 10 months ago by bowoolley.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Alexandre Gaboriau

    (@mcurly)

    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)

    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

    (@bowoolley)

    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

    (@mcurly)

    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Syntax error’ is closed to new replies.