Support » Plugin: Lightbox with PhotoSwipe » Critical error while upgrading to 3.3.0

  • Resolved markosolo


    Just got the following error while updating to 3.3.0 and had to use Wordrpress recovery mode to disable and get my site back. This is a great lightweight plugin and I hope you can figure out the problem.


    Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.

    In this case, WordPress caught an error with one of your plugins, Lightbox with PhotoSwipe.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Arno Welzel


    Sorry, without any further details I can not help you. At least I would need to see the error message.

    Edit: If possible, please check your server logs if the exact error was recorded somewhere. I update about 30 websites with the new version without any issue so far.

    Thread Starter markosolo


    Sorry about that…

    When seeking help with this issue, you may be asked for some of the following information:
    WordPress version 5.9.1
    Current theme: GeneratePress (version 3.1.0)
    Current plugin: Lightbox with PhotoSwipe (version 3.3.0)
    PHP version 7.3.33

    Error Details
    An error of type E_PARSE was caused in line 31 of the file /home/t095du1hjey9/public_html/wp-content/plugins/lightbox-photoswipe/lightbox-photoswipe.php. Error message: syntax error, unexpected ‘OptionsManager’ (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)`

    Plugin Author Arno Welzel


    This error is caused by using an outdated PHP version on the server. It should be at least PHP 7.3.

    The line which caused this error message is using a language construct which is only avaible in PHP 7.3 or later. And PHP 7.3 is already out of support – the current version of PHP is 8.1 and public websites should at least use PHP 7.4.

    I made a change in the code to make it work with older PHP versions as well. But please ask your hosting provider to update PHP to a supported version – you will sooner or later experience other problems like this.

    Also see:

    Thread Starter markosolo


    Thank you Arno! I updated PHP to 8.1 through cPanel and all is great now. I will go through all my sites and do the same. Thanks again for your excellent work and quick response!



    I had the same problem today as @markosolo. I updated my PHP version from 7.3 to 8.1 and everything seems ok again. Thanks for the info Arno.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Critical error while upgrading to 3.3.0’ is closed to new replies.