Title: PHP Warning array expectation error
Last modified: June 22, 2021

---

# PHP Warning array expectation error

 *  Resolved [Creatium](https://wordpress.org/support/users/creatium/)
 * (@creatium)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/php-warning-array-expectation-error/)
 * Hi,
 * I keep seeing these errors in debug log:
 *     ```
       PHP Warning:  array_keys() expects parameter 1 to be array, null given in /home/website/domains/website/public_html/wp-content/plugins/capability-manager-enhanced/framework/lib/users.php on line 88
   
       PHP Warning:  array_reduce() expects parameter 1 to be array, null given in /home/website/domains/website/public_html/wp-content/plugins/capability-manager-enhanced/framework/lib/users.php on line 88
       ```
   
 * I use 2.0.2 version, current WP Version 5.7.2. But this is an ongoing problem
   throughout multiple WP versions.
 * I’m pretty sure this is a unique problem, since I was unable to find similar 
   questions. But maybe someone can direct me in right direction to what might be
   causing this?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Kevin Behrens](https://wordpress.org/support/users/kevinb/)
 * (@kevinb)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/php-warning-array-expectation-error/#post-14584516)
 * [@creatium](https://wordpress.org/support/users/creatium/) This error is caused
   by pointing the role editor to a role that doesn’t have a valid capabilities 
   array. The next release will check for this condition before executing the line
   of code cited in the PHP Warning.

Viewing 1 replies (of 1 total)

The topic ‘PHP Warning array expectation error’ is closed to new replies.

 * ![](https://ps.w.org/capability-manager-enhanced/assets/icon-256x256.png?rev=
   3408171)
 * [PublishPress Capabilities - User Role Editor, Access Permissions, User Capabilities, Admin Menus](https://wordpress.org/plugins/capability-manager-enhanced/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/capability-manager-enhanced/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/capability-manager-enhanced/)
 * [Active Topics](https://wordpress.org/support/plugin/capability-manager-enhanced/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/capability-manager-enhanced/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/capability-manager-enhanced/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Kevin Behrens](https://wordpress.org/support/users/kevinb/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/php-warning-array-expectation-error/#post-14584516)
 * Status: resolved