Title: Warning: in_array() expects parameter 2 to be array, string given
Last modified: August 21, 2016

---

# Warning: in_array() expects parameter 2 to be array, string given

 *  [espritlibre](https://wordpress.org/support/users/espritlibre/)
 * (@espritlibre)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-string-given/)
 * Hi
 * I’m getting this warning:
 *     ```
       Warning: in_array() expects parameter 2 to be array, string given in /wp-includes/theme.php on line 1682
       ```
   
 * It’s in the current_theme_supports() function of theme.php:
 *     ```
       current_theme_supports('post-thumbnails')
       [...]
       return in_array( $content_type, $_wp_theme_features[$feature][0] );
       ```
   
 * $_wp_theme_features[$feature][0] is actually a string: ‘portfolio’
 * How can this be resolved?
 * Thanks.

Viewing 1 replies (of 1 total)

 *  Thread Starter [espritlibre](https://wordpress.org/support/users/espritlibre/)
 * (@espritlibre)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-string-given/#post-4567964)
 * Mmm.
 * I returned false when $content_type equals to ‘product’ and the warning disappear.
 * This seems to be an incompatibility issue with WooCommerce.

Viewing 1 replies (of 1 total)

The topic ‘Warning: in_array() expects parameter 2 to be array, string given’ is
closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/portfolio-press/2.8.0/screenshot.
   jpg)
 * Portfolio Press
 * [Support Threads](https://wordpress.org/support/theme/portfolio-press/)
 * [Active Topics](https://wordpress.org/support/theme/portfolio-press/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/portfolio-press/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/portfolio-press/reviews/)

## Tags

 * [in_array](https://wordpress.org/support/topic-tag/in_array/)
 * [string](https://wordpress.org/support/topic-tag/string/)
 * [warning](https://wordpress.org/support/topic-tag/warning/)

 * 1 reply
 * 1 participant
 * Last reply from: [espritlibre](https://wordpress.org/support/users/espritlibre/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-string-given/#post-4567964)
 * Status: not resolved