Title: function in_array: Wrong data type for second argument
Last modified: August 20, 2016

---

# function in_array: Wrong data type for second argument

 *  Resolved [linux4me2](https://wordpress.org/support/users/linux4me2/)
 * (@linux4me2)
 * [13 years ago](https://wordpress.org/support/topic/function-in_array-wrong-data-type-for-second-argument/)
 * I’m using Marketpress Lite 2.5.1 on a WP 3.5.1 site in a Twenty-Ten theme.
 * When a user clicks a Category tag in a product listing, multiple warnings like
   this are thrown:
    `[20-Mar-2013 18:30:59] PHP Warning: in_array() [<a href='function.
   in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/
   <my server user name>/public_html/wp-includes/post-template.php on line 1039`
 * This does not occur when the user clicks Category tags in posts.
 * It looks like the same issue discussed [here](http://premium.wpmudev.org/forums/topic/error-showing-in-header-of-marketpress-site),
   where they say a fix was released a couple of months ago in version 2.8. It appears
   that is the Pro version. Is there a fix in an upcoming version of Marketpress
   Lite? Is there a workaround in the meantime?
 * [http://wordpress.org/extend/plugins/wordpress-ecommerce/](http://wordpress.org/extend/plugins/wordpress-ecommerce/)

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

 *  [tom.eagles](https://wordpress.org/support/users/tomeagles/)
 * (@tomeagles)
 * [13 years ago](https://wordpress.org/support/topic/function-in_array-wrong-data-type-for-second-argument/#post-3584624)
 * [@linux4me2](https://wordpress.org/support/users/linux4me2/)
 * Hi There, a new version is on the way it was delayed slightly to incorportate
   some last minute new features.
 * Cheers
 * Tom
 *  [federicoh](https://wordpress.org/support/users/federicoh/)
 * (@federicoh)
 * [13 years ago](https://wordpress.org/support/topic/function-in_array-wrong-data-type-for-second-argument/#post-3584686)
 * Same issue here error showing on some categories
 *  [federicoh](https://wordpress.org/support/users/federicoh/)
 * (@federicoh)
 * [13 years ago](https://wordpress.org/support/topic/function-in_array-wrong-data-type-for-second-argument/#post-3584687)
 * This is what worked for me:
 * I didn’t have a custom menu, I recreated my menu in Appearance – Menu, just like
   the one I used to have and I don’t get any more errors messages. Good luck

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

The topic ‘function in_array: Wrong data type for second argument’ is closed to 
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-ecommerce_f7d96b.svg)
 * [MarketPress - WordPress eCommerce](https://wordpress.org/plugins/wordpress-ecommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-ecommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-ecommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-ecommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-ecommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-ecommerce/reviews/)

## Tags

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

 * 3 replies
 * 3 participants
 * Last reply from: [federicoh](https://wordpress.org/support/users/federicoh/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/function-in_array-wrong-data-type-for-second-argument/#post-3584687)
 * Status: resolved