Title: Warning: array_key_exists
Last modified: August 21, 2016

---

# Warning: array_key_exists

 *  [Andy Whalen](https://wordpress.org/support/users/anukit/)
 * (@anukit)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/warning-array_key_exists-8/)
 * On a fresh WP 3.5.1 installation, after installing and activating the latest 
   version of this plugin, I get the following error in the Dashboard:
 * `Warning: array_key_exists() expects parameter 2 to be array, boolean given in[
   snipped]/plugins/addthis/includes/addthis_addjs.php on line 53`
 * This only happens once, then it never appears again. I’ve replicated this behavior
   multiple times by testing out fresh installations of WordPress.
 * I assume the problem here is that the code is trying to retrieve and use options
   that don’t exist in the database yet. I would think the options are set the first
   time the plugin code is loaded, which explains why the warning appears only once.
 * Thanks!
 * [http://wordpress.org/extend/plugins/addthis/](http://wordpress.org/extend/plugins/addthis/)

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

 *  [Srijith V](https://wordpress.org/support/users/srijithv/)
 * (@srijithv)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/warning-array_key_exists-8/#post-3649994)
 * Hey Andy, first of all thanks for reporting this issue! We tried to get it reproduced
   here, but failed. We have tried in multiple fresh installations. It will be helpful
   if you can provide more info like the theme used and whether you use any backed
   up data (DB/Posts etc.).
 *  Thread Starter [Andy Whalen](https://wordpress.org/support/users/anukit/)
 * (@anukit)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/warning-array_key_exists-8/#post-3649996)
 * I should note that I’m using this on a multisite network, and maybe that’s where
   the problem lies. The steps I’m taking to get this are:
    1. Install WP 3.5.1, enable multisite network
    2. Install the AddThis plugin through Network Admin > Plugins and then network 
       activate it
    3. Add a new site to the network (Network Admin > Sites > Add New)
    4. Immediately visit the new site’s Dashboard by clicking on the link that appears
       after adding the site (if I visit another page first, like the front page, I
       may not see the warning, making me think it happens somewhere where it’s not
       visible to me)
    5. `Warning: array_key_exists()` appears at the top of the Dashboard
 * I’m starting with a brand new installation, and I’m not using a backed up database
   or imported posts. I’m using the default Twenty Twelve (version 1.1) theme that
   comes with WP 3.5.1.
 *  [nanggroe](https://wordpress.org/support/users/nanggroe/)
 * (@nanggroe)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/warning-array_key_exists-8/#post-3650086)
 * same problem here..
 * `Warning: array_key_exists() expects parameter 2 to be array, null given in /
   home/sloki/user/12345/sites/www.somewebsite.com/www/wp-content/plugins/addthis-
   smart-layers/addthis-smart_layers.php on line 188`

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

The topic ‘Warning: array_key_exists’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/addthis_70cced.svg)
 * [WordPress Share Buttons Plugin – AddThis](https://wordpress.org/plugins/addthis/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/addthis/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/addthis/)
 * [Active Topics](https://wordpress.org/support/plugin/addthis/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/addthis/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/addthis/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [nanggroe](https://wordpress.org/support/users/nanggroe/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/warning-array_key_exists-8/#post-3650086)
 * Status: not resolved