Support » Plugin: ShortPixel Image Optimizer » Fatal Server Error on Settings Page

  • Resolved KZeni


    I got the following when loading the main ShortPixel settings page:

    An error of type E_PARSE was caused in line 369 of the file wp-content/plugins/shortpixel-image-optimiser/class/view/settings/part-advanced.php. Error message: syntax error, unexpected ')'

    This is preventing the settings page from loading fully (it shows the fatal error was encountered partway through loading the settings page).

    It appears there’s a trailing comma after the last parameter in a printf function, and this has an issue in some versions of PHP (7.2.x at the very least.) Removing that comma fixes the error.

    Removing trailing commas on PHP parameters in any given function call is a simple thing to ensure PHP version compatibility (since the comma is needless anyway so might as well be made to be compatible.)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Pedro


    Hello @kzeni,

    Thanks for another great find! We’ve already spotted that one and we’ll include the fix in the upcoming 5.0.6 release, due next week.

    Until then, the workaround is to simply update PHP to 7.4.x, which should work with no issues.

    Many thanks again!
    Pedro/ShortPixel team

    Thread Starter KZeni


    I appreciate the update & confirmation!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.