Title: Critical errors having to do with PHP syntax
Last modified: August 11, 2021

---

# Critical errors having to do with PHP syntax

 *  Resolved [Little Package](https://wordpress.org/support/users/littlepackage/)
 * (@littlepackage)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/critical-errors-having-to-do-with-php-syntax/)
 * Hi,
 * Thought I’d share this error (below) with you. Couldn’t recognize the “array 
   function” syntax or confirm that it is correct, so I rolled it back to usual 
   function syntax to stop the critical errors occurring (not sure when they occur
   but my client confirmed site was down occasionally yesterday).
 * [10-Aug-2021 19:29:03 UTC] PHP Parse error: syntax error, unexpected ‘:’, expecting‘;’
   or ‘{‘ in /home/etc-etc-etc/public_html/wp-content/plugins/webp-converter-for-
   media/src/PluginData.php on line 42

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

 *  Plugin Author [Mateusz Gbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/)
 * (@mateuszgbiorczyk)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/critical-errors-having-to-do-with-php-syntax/#post-14758516)
 * Hello [@littlepackage](https://wordpress.org/support/users/littlepackage/),
 * Thanks for your message.
 * What version of PHP are you using?
 * Best,
    Mateusz
 *  Thread Starter [Little Package](https://wordpress.org/support/users/littlepackage/)
 * (@littlepackage)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/critical-errors-having-to-do-with-php-syntax/#post-14758527)
 * 7.3.29, which hasn’t reached end-of-life yet.
 *  Plugin Author [Mateusz Gbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/)
 * (@mateuszgbiorczyk)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/critical-errors-having-to-do-with-php-syntax/#post-14758537)
 * [@littlepackage](https://wordpress.org/support/users/littlepackage/) The error
   is related to this line:
    `public function get_plugin_settings(): array {`
 * In order for a syntax error to occur on this line the PHP version 5.6 or earlier
   would have to be used. Since version 7.0, this notation is correct.
 *  Thread Starter [Little Package](https://wordpress.org/support/users/littlepackage/)
 * (@littlepackage)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/critical-errors-having-to-do-with-php-syntax/#post-14758542)
 * 7.3.29, and getting the error. Not seeing any other major plugins or themes using
   this syntax anywhere, or any documentation of it. Can you provide some reference
   for me please?
 * FWIW I know what lines caused the issue and changed them for now.
    -  This reply was modified 4 years, 10 months ago by [Little Package](https://wordpress.org/support/users/littlepackage/).
      Reason: typo: "any other" not "anyone other"
 *  Plugin Author [Mateusz Gbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/)
 * (@mateuszgbiorczyk)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/critical-errors-having-to-do-with-php-syntax/#post-14758548)
 * [@littlepackage](https://wordpress.org/support/users/littlepackage/) Please give
   me the content of the line before and after your change.
 *  Thread Starter [Little Package](https://wordpress.org/support/users/littlepackage/)
 * (@littlepackage)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/critical-errors-having-to-do-with-php-syntax/#post-14758562)
 * 7.3.29, and getting the error with the code _as you wrote it_. I’ve upgraded 
   to 7.4 (highest allowed on this client’s server) and will let you know if your
   plugin continues to crash this site.

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

The topic ‘Critical errors having to do with PHP syntax’ is closed to new replies.

 * ![](https://ps.w.org/webp-converter-for-media/assets/icon-256x256.png?rev=2636288)
 * [Converter for Media - Optimize images | Convert WebP & AVIF](https://wordpress.org/plugins/webp-converter-for-media/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/webp-converter-for-media/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/webp-converter-for-media/)
 * [Active Topics](https://wordpress.org/support/plugin/webp-converter-for-media/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/webp-converter-for-media/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/webp-converter-for-media/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Little Package](https://wordpress.org/support/users/littlepackage/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/critical-errors-having-to-do-with-php-syntax/#post-14758562)
 * Status: resolved