Title: Error undefined array key
Last modified: January 27, 2023

---

# Error undefined array key

 *  Resolved [opfoxtuck](https://wordpress.org/support/users/opfoxtuck/)
 * (@opfoxtuck)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/error-undefined-array-key/)
 * I am getting an error output on a page. **Warning**: Undefined array key “sizes”
   in **/…/plugins/performance-lab/modules/images/webp-uploads/load.php** on line**
   594**
 * any idea on how to fix this?
 * kind regards, FT

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

 *  Thread Starter [opfoxtuck](https://wordpress.org/support/users/opfoxtuck/)
 * (@opfoxtuck)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/error-undefined-array-key/#post-16413051)
 * Additionally, on the same page I get the error… **Warning**: foreach() argument
   must be of type array|object, null given in **/…/plugins/performance-lab/modules/
   images/webp-uploads/load.php** on line **594**
 *  Plugin Support [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * (@jamesosborne)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/error-undefined-array-key/#post-16413837)
 * Thanks for reaching out [@opfoxtuck](https://wordpress.org/support/users/opfoxtuck/).
   We’d certainly be happy to look into this and see what we can determine. In order
   to do so, can you share the following:
    1. What version of PHP are you using?
    2. Is there a particular wp-admin page or even a page on the front end of your 
       site where you’re encountering these warnings, or do you notice these anytime
       you upload an image?
    3. When checking your Site Health status (_[Tools > Site Health > Status](https://i.imgur.com/wSRWwon.png)_)
       can you confirm that your site supports WebP ([Example](https://i.imgur.com/x6AT3dB.png))?
       If so, you’ll find it under the “Passed tests” section.
 * Looking forward to hearing from you.
 *  Thread Starter [opfoxtuck](https://wordpress.org/support/users/opfoxtuck/)
 * (@opfoxtuck)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/error-undefined-array-key/#post-16414921)
 * Thanks for your response. Using PHP 8.0. Happening on a specific page (site is
   in dev mode, so nothing public to show. I will have a dig around over the weekend.
   I’ll close this ticket and see how I get on.
 * Thanks for the suggestions.
 *  Plugin Support [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * (@jamesosborne)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/error-undefined-array-key/#post-16415057)
 * Thanks for the update [@opfoxtuck](https://wordpress.org/support/users/opfoxtuck/).
   The warnings may be originating in how the plugin works with WordPress core and
   PHP 8, with this version still in [beta support](https://make.wordpress.org/core/handbook/references/php-compatibility-and-wordpress-versions/).
 * As it’s a warning as opposed to an error I suspect it won’t cause issues, but
   do let us know if you find anything else. I’ll also make the team aware of your
   query in the meantime. Thank you, and have a great weekend.
 *  Plugin Support [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * (@jamesosborne)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/error-undefined-array-key/#post-16415722)
 * Just to let you know I’ve created the following GitHub issue based on your experience:
   
   [https://github.com/WordPress/performance/issues/632](https://github.com/WordPress/performance/issues/632)
 * Many thanks for flagging this.

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

The topic ‘Error undefined array key’ is closed to new replies.

 * ![](https://ps.w.org/performance-lab/assets/icon.svg?rev=2787149)
 * [Performance Lab](https://wordpress.org/plugins/performance-lab/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/performance-lab/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/performance-lab/)
 * [Active Topics](https://wordpress.org/support/plugin/performance-lab/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/performance-lab/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/performance-lab/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/error-undefined-array-key/#post-16415722)
 * Status: resolved