Title: Warning: array_key_exists() expects parameter 2 to be array&#8230;
Last modified: August 21, 2016

---

# Warning: array_key_exists() expects parameter 2 to be array…

 *  Resolved [Albert](https://wordpress.org/support/users/planetshaker/)
 * (@planetshaker)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array/)
 * I get following Error when installing and activating the plugin:
 * `Warning: array_key_exists() expects parameter 2 to be array, boolean given in/
   www/htdocs/w011c661/website/wp-content/plugins/stops-core-theme-and-plugin-updates/
   Function.php on line 431`
 * Any Idea, why this happens?
 * [https://wordpress.org/plugins/stops-core-theme-and-plugin-updates/](https://wordpress.org/plugins/stops-core-theme-and-plugin-updates/)

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array/page/2/?output_format=md)

 *  Plugin Contributor [Matthew](https://wordpress.org/support/users/kidsguide/)
 * (@kidsguide)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array/#post-5102378)
 * Is it when you activate it, or when you check a setting?
 * I have already gotten this error and I am trying to fix it ASAP.
 *  Thread Starter [Albert](https://wordpress.org/support/users/planetshaker/)
 * (@planetshaker)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array/#post-5102381)
 * It’s directly after activating.
 *  Plugin Contributor [Matthew](https://wordpress.org/support/users/kidsguide/)
 * (@kidsguide)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array/#post-5102382)
 * The problem is with this code.
 *     ```
       static function plugin_block_action_link( $actions, $plugin_file, $plugin_data, $context ) {
   
       		$blocked = get_option( 'disable_updates_blocked' );
   
       		if ( array_key_exists( $plugin_file, $blocked ) ) {
   
       			$actions[] = '<a class="delete" href="plugins.php?_wpnonce=' . wp_create_nonce( 'disable_updates' ) . '&disable_updates&unblock=' . $plugin_file . '">Unblock Updates</a>';
   
       		} else {
   
       			$actions[] = '<a class="delete" href="plugins.php?_wpnonce=' . wp_create_nonce( 'disable_updates' ) . '&disable_updates&block=' . $plugin_file . '">Block Updates</a>';
       		}
   
       		return $actions;
       	}
       ```
   
 * I am currently trying to figure it out and fix it.
 *  Plugin Contributor [Matthew](https://wordpress.org/support/users/kidsguide/)
 * (@kidsguide)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array/#post-5102384)
 * If you reinstall the plugin, what happens?
 *  Thread Starter [Albert](https://wordpress.org/support/users/planetshaker/)
 * (@planetshaker)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array/#post-5102392)
 * The error only appears if **Disable Plugins Individually** is set. So my first
   statement was wrong. It does not appear directly after activating!
 * I have reinstalled it – same issue.
 *  [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * (@shazahm1hotmailcom)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array/#post-5102396)
 * I can fix this and issue a pull request today.
 *  Plugin Contributor [Matthew](https://wordpress.org/support/users/kidsguide/)
 * (@kidsguide)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array/#post-5102534)
 * 4.2.10beta1 is available at [http://devwpp.wordpress.com/2014/07/23/disable-updates-manager-4-2-10beta1/](http://devwpp.wordpress.com/2014/07/23/disable-updates-manager-4-2-10beta1/).
 * Please let me know if it fixes it or not.
 *  Thread Starter [Albert](https://wordpress.org/support/users/planetshaker/)
 * (@planetshaker)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array/#post-5102535)
 * No, still there. Directly after checking the box for “Disable Plugins Individually
   Enabling this option will show the list of plugins to disable updates.” I got
   following error:
 *     ```
       Warning: array_fill_keys() expects parameter 1 to be array, null given in wp-content/plugins/stops-core-theme-and-plugin-updates/Function.php on line 126
   
       Warning: Cannot modify header information - headers already sent by (output started at /wp-content/plugins/stops-core-theme-and-plugin-updates/Function.php:126) in /www/htdocs/w011c661/website/wp-includes/pluggable.php on line 1121
       ```
   
 * Then, when checking the plugins, I see:
 * `Warning: array_key_exists() expects parameter 2 to be array, string given in/
   wp-content/plugins/stops-core-theme-and-plugin-updates/Function.php on line 489`
 *  Plugin Contributor [Matthew](https://wordpress.org/support/users/kidsguide/)
 * (@kidsguide)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array/#post-5102536)
 * So you got two errors?
 *  Thread Starter [Albert](https://wordpress.org/support/users/planetshaker/)
 * (@planetshaker)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array/#post-5102540)
 * Yep, one after activating the option and the others when viewing the plugins 
   list.
 *  [jakesdish](https://wordpress.org/support/users/phoobah/)
 * (@phoobah)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array/#post-5102555)
 * I have the same problem when installing ‘Disable Updates Manager’ on a new website(
   to disable one particular plugin).
 * I will add though: on one of my previous websites that use the same ‘Disable 
   Updates Manager’ plugin there are no issues. That version of ‘DAU’ plugin was
   installed back in May I think?
 * In summation I’m guessing this problem is from new installs only. Perhaps there
   is an older version of the ‘Disable Updates Manager’ plugin available to install
   first, and can do updates on the ‘DAU’ plugin there after to current – as a temporary
   work around? So with that, is there an older version of ‘Disable Updates Manager’
   plugin available online?
 * Hope that feedback helps.
 *  [ChristinaHooper](https://wordpress.org/support/users/christinahooper/)
 * (@christinahooper)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array/#post-5102559)
 * I had this same error on a new installation – however as soon as I blocked at
   least one plugin -the error went away.
 * [@phoobah](https://wordpress.org/support/users/phoobah/) – maybe that’s why you
   didn’t the error when you upgraded, you already had plugins blocked.
 *  [jakesdish](https://wordpress.org/support/users/phoobah/)
 * (@phoobah)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array/#post-5102560)
 * [@christina](https://wordpress.org/support/users/christina/) – Reactivated plugin,
   error came back. When blocked one plugin, error message went away. Thanks for
   heads up Christina!
 *  Plugin Contributor [Matthew](https://wordpress.org/support/users/kidsguide/)
 * (@kidsguide)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array/#post-5102562)
 * Is the error stopping you from doing anything?
 * Can you please post a picture so that I can see the error?
 *  [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * (@shazahm1hotmailcom)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array/#post-5102563)
 * [@matthew](https://wordpress.org/support/users/matthew/)
 * I just updated my pull request which addresses the no index defined and array_fill_keys()
   error.

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array/page/2/?output_format=md)

The topic ‘Warning: array_key_exists() expects parameter 2 to be array…’ is closed
to new replies.

 * ![](https://ps.w.org/stops-core-theme-and-plugin-updates/assets/icon-256x256.
   png?rev=1896941)
 * [Easy Updates Manager](https://wordpress.org/plugins/stops-core-theme-and-plugin-updates/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/stops-core-theme-and-plugin-updates/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/stops-core-theme-and-plugin-updates/)
 * [Active Topics](https://wordpress.org/support/plugin/stops-core-theme-and-plugin-updates/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/stops-core-theme-and-plugin-updates/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/stops-core-theme-and-plugin-updates/reviews/)

 * 22 replies
 * 5 participants
 * Last reply from: [Matthew](https://wordpress.org/support/users/kidsguide/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array/page/2/#post-5102574)
 * Status: resolved