Title: Warning Undefined array key &#8220;capabilities&#8221;
Last modified: August 10, 2021

---

# Warning Undefined array key “capabilities”

 *  Resolved [Jonathan Jewell](https://wordpress.org/support/users/hyperpolymath/)
 * (@hyperpolymath)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/warning-undefined-array-key-capabilities/)
 * Getting this commentary from query monitor, it goes and returns with the same
   error when I turn it off and even uninstall and reinstall it. I get the impression
   this is an issue your side, but not tried it on other installations. Your other
   plugins are not reporting any issues, but it is something that I would prefer
   not there and will remove the plugin if it remains. But thought I’d raise it 
   and see if you can fix it, or if I need to do something to get it fixed. Please
   let me know.
 * thanks
 *     ```
       Warning	Undefined array key "capabilities"	2	
       wp-includes/class-wp-roles.php:290
       WP_Roles->init_roles()
       wp-includes/class-wp-roles.php:330
       WP_Roles->for_site()
       wp-includes/class-wp-roles.php:90
       WP_Roles->__construct()
       wp-includes/capabilities.php:817
       wp_roles()
       wp-includes/class-wp-user.php:508
       WP_User->get_role_caps()
       wp-includes/class-wp-user.php:854
       WP_User->for_site()
       wp-includes/class-wp-user.php:176
       WP_User->init()
       wp-includes/pluggable.php:116
       get_user_by()
       wp-includes/pluggable.php:707
       wp_validate_auth_cookie()
       wp-includes/class-wp-hook.php:303
       apply_filters('determine_current_user')
       wp-includes/user.php:3193
       _wp_get_current_user()
       wp-includes/pluggable.php:70
       wp_get_current_user()
       wp-includes/l10n.php:97
       get_user_locale()
       wp-includes/l10n.php:140
       determine_locale()
       wp-includes/l10n.php:878
       load_plugin_textdomain()
       wp-content/plugins/shortpixel-image-optimiser/class/wp-short-pixel.php:39
       WPShortPixel->__construct()
       wp-content/plugins/shortpixel-image-optimiser/shortpixel-plugin.php:57
       ShortPixel\ShortPixelPlugin->lowInit()
       wp-includes/class-wp-hook.php:303
       do_action('plugins_loaded')
       wp-settings.php:441
       Plugin: shortpixel-image-optimiser
       ```
   

Viewing 1 replies (of 1 total)

 *  [Gerard Blanco](https://wordpress.org/support/users/sixaxis/)
 * (@sixaxis)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/warning-undefined-array-key-capabilities/#post-14759684)
 * Hi Jonathan,
 * From what I can see, it seems like somebody made some changes to the user roles
   or permissions, or something similar; it seems there is a role without any capabilities.
 * Can you please check that?
 * Thank you,

Viewing 1 replies (of 1 total)

The topic ‘Warning Undefined array key “capabilities”’ 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/)

## Tags

 * [array](https://wordpress.org/support/topic-tag/array/)
 * [capabilities](https://wordpress.org/support/topic-tag/capabilities/)
 * [warning](https://wordpress.org/support/topic-tag/warning/)

 * 1 reply
 * 2 participants
 * Last reply from: [Gerard Blanco](https://wordpress.org/support/users/sixaxis/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/warning-undefined-array-key-capabilities/#post-14759684)
 * Status: resolved