Title: Warning: array_key_exists() [function.array-key-exists]
Last modified: August 20, 2016

---

# Warning: array_key_exists() [function.array-key-exists]

 *  Resolved [passiman](https://wordpress.org/support/users/passiman/)
 * (@passiman)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/warning-array_key_exists-functionarray-key-exists-2/)
 * I am getting this error on sidebar widget
 * Warning: array_key_exists() [function.array-key-exists]: The first argument should
   be either a string or an integer in \wp-includes\cache.php on line 618
 * [http://wordpress.org/extend/plugins/rating-widget/](http://wordpress.org/extend/plugins/rating-widget/)

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

 *  Plugin Author [Vova Feldman](https://wordpress.org/support/users/svovaf/)
 * (@svovaf)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/warning-array_key_exists-functionarray-key-exists-2/#post-3448766)
 * Hi [@passiman](https://wordpress.org/support/users/passiman/),
 * The mentioned file, `\wp-includes\cache.php` isn’t part of the Rating-Widget 
   plugin. Why do you think it’s related?
 *  Thread Starter [passiman](https://wordpress.org/support/users/passiman/)
 * (@passiman)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/warning-array_key_exists-functionarray-key-exists-2/#post-3448773)
 * Hi Vova
 * I am not very good with programming just use the plugins. Buddy what’s a solution
   I do use the wp cache plugin for caching, any alternatives you can suggest please?
 * Thanks
 *  Plugin Author [Vova Feldman](https://wordpress.org/support/users/svovaf/)
 * (@svovaf)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/warning-array_key_exists-functionarray-key-exists-2/#post-3448774)
 * One simple way to hide the warning is by adding ‘@’ before the method. Just open
   the file on the specified line, and replace
    `array_key_exists` with `@array_key_exists`.
   That should do the job.
 * **Note:**
    This is not a solution , you should contact the plugin developer to
   solve this.
 * Best!
 *  [Jaabie](https://wordpress.org/support/users/jamieacowangmailcom/)
 * (@jamieacowangmailcom)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/warning-array_key_exists-functionarray-key-exists-2/#post-3448777)
 * I have a similar error and I do not have any cache plugins activate?
 * I did have super-cache and ‘DB cache reloaded’ installed with my theme but i 
   have them deactivated at present.
 * Its odd because the error does not show on every page the widget is on, just 
   some.
 *  Plugin Author [Vova Feldman](https://wordpress.org/support/users/svovaf/)
 * (@svovaf)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/warning-array_key_exists-functionarray-key-exists-2/#post-3448778)
 * @Jaabie, as mentioned before, `\wp-includes\cache.php` have nothing to do with
   the Rating-Widget plugin.
 *  [vgevge](https://wordpress.org/support/users/vgevge/)
 * (@vgevge)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/warning-array_key_exists-functionarray-key-exists-2/#post-3448779)
 * I am having the same error exactly.
 * The only way to fix it is to disable the Rating-Widget Plugin.
 *  [vgevge](https://wordpress.org/support/users/vgevge/)
 * (@vgevge)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/warning-array_key_exists-functionarray-key-exists-2/#post-3448780)
 * The error just showed up today. I had never seen it before, no changes were made
   to my blog, and the error just suddenly showed up on my PHP error log again, 
   and again, and again.
 *  Plugin Author [Vova Feldman](https://wordpress.org/support/users/svovaf/)
 * (@svovaf)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/warning-array_key_exists-functionarray-key-exists-2/#post-3448781)
 * [@vgevge](https://wordpress.org/support/users/vgevge/) are you sure the error
   happens at `\wp-includes\cache.php`?
 *  [vgevge](https://wordpress.org/support/users/vgevge/)
 * (@vgevge)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/warning-array_key_exists-functionarray-key-exists-2/#post-3448782)
 * yes
    Warning: array_key_exists() [function.array-key-exists]: The first argument
   should be either a string or an integer in \wp-includes\cache.php on line 618
 * Disabling the cache doesn’t fix it.
 *  Plugin Author [Vova Feldman](https://wordpress.org/support/users/svovaf/)
 * (@svovaf)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/warning-array_key_exists-functionarray-key-exists-2/#post-3448783)
 * And disabling the Rating-Widget solves this?
 *  [vgevge](https://wordpress.org/support/users/vgevge/)
 * (@vgevge)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/warning-array_key_exists-functionarray-key-exists-2/#post-3448785)
 * yes
 *  Plugin Author [Vova Feldman](https://wordpress.org/support/users/svovaf/)
 * (@svovaf)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/warning-array_key_exists-functionarray-key-exists-2/#post-3448786)
 * That’s really strange. There’s only one usage of this function in our code, but
   we are just using it. Honestly, I don’t have a clue why this warning pops up,
   but you can easily work around it by disabling the warnings echo. Just append
   the following lines to the end of your **wp-config.php** file:
 *     ```
       error_reporting(E_ERROR);
       ini_set('error_reporting', E_ERROR);
       ini_set('display_errors',false);
       ini_set('html_errors', false);
       ```
   
 * Let me know if it resolved the issue.

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

The topic ‘Warning: array_key_exists() [function.array-key-exists]’ is closed to
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/rating-widget_4db0e0.svg)
 * [Rating-Widget: Star Review System](https://wordpress.org/plugins/rating-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/rating-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/rating-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/rating-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/rating-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/rating-widget/reviews/)

 * 12 replies
 * 4 participants
 * Last reply from: [Vova Feldman](https://wordpress.org/support/users/svovaf/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/warning-array_key_exists-functionarray-key-exists-2/#post-3448786)
 * Status: resolved