Title: PHP Fatal error and PHP Warning
Last modified: June 19, 2018

---

# PHP Fatal error and PHP Warning

 *  [gerd.neumann](https://wordpress.org/support/users/gerdneumann/)
 * (@gerdneumann)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/php-fatal-error-and-php-warning/)
 * Just fyi, I’ve seen this php fatal Error and this warning in my server logs while
   bulk optimizing:
 *     ```
       19-Jun-2018 02:28:38 UTC] PHP Warning:  Illegal string offset 'ShortPixel' in /srv/data/web/vhosts/www.ourwebsite.de/htdocs/wp-content/plugins/shortpixel-image-optimiser/class/wp-short-pixel.php on line 515
       [19-Jun-2018 02:28:38 UTC] PHP Fatal error:  Uncaught Error: Cannot use string offset as an array in /srv/data/web/vhosts/www.ourwebsite.de/htdocs/wp-content/plugins/shortpixel-image-optimiser/class/wp-short-pixel.php:515
       Stack trace:
       #0 /srv/data/web/vhosts/www.ourwebsite.de/htdocs/wp-includes/class-wp-hook.php(286): WPShortPixel->handleCustomBulk('')
       #1 /srv/data/web/vhosts/www.ourwebsite.de/htdocs/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
       #2 /srv/data/web/vhosts/www.ourwebsite.de/htdocs/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
       #3 /srv/data/web/vhosts/www.ourwebsite.de/htdocs/wp-admin/admin.php(332): do_action('load-upload.php')
       #4 /srv/data/web/vhosts/www.ourwebsite.de/htdocs/wp-admin/upload.php(10): require_once('/srv/data/web/v...')
       #5 {main}
         thrown in /srv/data/web/vhosts/www.ourwebsite.de/htdocs/wp-content/plugins/shortpixel-image-optimiser/class/wp-short-pixel.php on line 515
       [19-Jun-2018 02:28:48 UTC] PHP Warning:  Illegal string offset 'ShortPixel' in /srv/data/web/vhosts/www.ourwebsite.de/htdocs/wp-content/plugins/shortpixel-image-optimiser/class/wp-short-pixel.php on line 515
       [19-Jun-2018 02:28:48 UTC] PHP Fatal error:  Uncaught Error: Cannot use string offset as an array in /srv/data/web/vhosts/www.ourwebsite.de/htdocs/wp-content/plugins/shortpixel-image-optimiser/class/wp-short-pixel.php:515
       Stack trace:
       #0 /srv/data/web/vhosts/www.ourwebsite.de/htdocs/wp-includes/class-wp-hook.php(286): WPShortPixel->handleCustomBulk('')
       #1 /srv/data/web/vhosts/www.ourwebsite.de/htdocs/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
       #2 /srv/data/web/vhosts/www.ourwebsite.de/htdocs/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
       #3 /srv/data/web/vhosts/www.ourwebsite.de/htdocs/wp-admin/admin.php(332): do_action('load-upload.php')
       #4 /srv/data/web/vhosts/www.ourwebsite.de/htdocs/wp-admin/upload.php(10): require_once('/srv/data/web/v...')
       #5 {main}
         thrown in /srv/data/web/vhosts/www.ourwebsite.de/htdocs/wp-content/plugins/shortpixel-image-optimiser/class/wp-short-pixel.php on line 515
       ```
   
 * Hope you can fix or better catch these errors against unexpected input?

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

 *  Plugin Author [ShortPixel](https://wordpress.org/support/users/shortpixel/)
 * (@shortpixel)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/php-fatal-error-and-php-warning/#post-10415562)
 * Hello again,
    can you please provide us with more details about the hosting environment
   you’re using? PHP version would be a start but any other relevant details should
   help as well.
 * Thanks,
    Alex
 *  Thread Starter [gerd.neumann](https://wordpress.org/support/users/gerdneumann/)
 * (@gerdneumann)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/php-fatal-error-and-php-warning/#post-10415632)
 * As said gandi.net Simple Hosting. Here’s an excerpt of our Woocommcerce status
   page:
 *     ```
       WC Version: 3.4.2
       Log Directory Writable: ✔
       WP Version: 4.9.6
       WP Multisite: –
       WP Memory Limit: 256 MB
       WP Debug Mode: –
       WP Cron: ✔
       Language: de_DE
   
       ### Server Environment ###
   
       Server Info: Apache
       PHP Version: 7.1.13 
       PHP Post Max Size: 128 MB
       PHP Time Limit: 180
       PHP Max Input Vars: 2500
       cURL Version: 7.38.0
       OpenSSL/1.0.1t
   
       SUHOSIN Installed: –
       MySQL Version: 5.7.20-18-log
       Max Upload Size: 128 MB
       Default Timezone is UTC: ✔
       fsockopen/cURL: ✔
       SoapClient: ✔
       DOMDocument: ✔
       GZip: ✔
       Multibyte String: ✔
       Remote Post: ✔
       Remote Get: ✔
       ```
   
 *  Plugin Author [ShortPixel](https://wordpress.org/support/users/shortpixel/)
 * (@shortpixel)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/php-fatal-error-and-php-warning/#post-10421733)
 * Thanks for the info, we’re looking into this and we’ll get back to you in a couple
   of days.

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

The topic ‘PHP Fatal error and PHP Warning’ is closed to new replies.

 * ![](https://ps.w.org/shortpixel-image-optimiser/assets/icon-256x256.gif?rev=3245715)
 * [ShortPixel Image Optimizer - Optimize Images, Convert WebP & AVIF](https://wordpress.org/plugins/shortpixel-image-optimiser/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortpixel-image-optimiser/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortpixel-image-optimiser/)
 * [Active Topics](https://wordpress.org/support/plugin/shortpixel-image-optimiser/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortpixel-image-optimiser/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortpixel-image-optimiser/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [ShortPixel](https://wordpress.org/support/users/shortpixel/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/php-fatal-error-and-php-warning/#post-10421733)
 * Status: not resolved