Title: Warning: array_key_exists() error after upgrade
Last modified: August 19, 2016

---

# Warning: array_key_exists() error after upgrade

 *  [svenke](https://wordpress.org/support/users/svenke/)
 * (@svenke)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/warning-array_key_exists-error-after-upgrade/)
 * Warning: array_key_exists() [function.array-key-exists]: The first argument should
   be either a string or an integer in /opt/www/bergierss/web/www.svinus.be/wp-includes/
   category-template.php on line 176
 * after the upgrade to version 2.3.1 i’m getting this error twice on the index 
   page of my blog.
 * In the category template file i don’t find anything that refers to array_key_exists
 * suggestions ?

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

 *  Thread Starter [svenke](https://wordpress.org/support/users/svenke/)
 * (@svenke)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/warning-array_key_exists-error-after-upgrade/#post-670805)
 * i found the reference, but how to solve
 * function in_category( $category ) { // Check if the current post is in the given
   category
    global $post, $blog_id;
 *  $categories = get_object_term_cache($post->ID, ‘category’);
    if ( false === 
   $categories ) $categories = wp_get_object_terms($post->ID, ‘category’); if(array_key_exists(
   $category, $categories)) return true; else return false; }
 *  [kiraslye](https://wordpress.org/support/users/kiraslye/)
 * (@kiraslye)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/warning-array_key_exists-error-after-upgrade/#post-670960)
 * if(array_key_exists($category, $categories))
 * it’s that line, I have the same error! Someone please help, I don’t know what
   it means to put a **string or integer?**
 * Warning: array_key_exists() [function.array-key-exists]: The first argument should
   be either a string or an integer in /home/polysly9/public_html/studiobijou/wp-
   includes/category-template.php on line 181
 *  [kiraslye](https://wordpress.org/support/users/kiraslye/)
 * (@kiraslye)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/warning-array_key_exists-error-after-upgrade/#post-670966)
 * Anyone able to help with this?
 *  [shlinklincoln](https://wordpress.org/support/users/shlinklincoln/)
 * (@shlinklincoln)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/warning-array_key_exists-error-after-upgrade/#post-670971)
 * bump
 *  [mikesz](https://wordpress.org/support/users/mikesz/)
 * (@mikesz)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/warning-array_key_exists-error-after-upgrade/#post-670981)
 * This problem has a solution:
 * [http://commonsense360.com/?p=14](http://commonsense360.com/?p=14)
 * From the MistyLook support site:
 * “You are using WordPress 2.3.1 and MistyLook 3.2. They don’t cooperate together.
   
   Please, download the newest version of ML (3.5) which works with new features
   WP 2.3.1 offers.”

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

The topic ‘Warning: array_key_exists() error after upgrade’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 5 replies
 * 4 participants
 * Last reply from: [mikesz](https://wordpress.org/support/users/mikesz/)
 * Last activity: [18 years, 4 months ago](https://wordpress.org/support/topic/warning-array_key_exists-error-after-upgrade/#post-670981)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
