Title: in_array() expects parameter 2 to be array
Last modified: September 23, 2018

---

# in_array() expects parameter 2 to be array

 *  Resolved [jenshaizmann](https://wordpress.org/support/users/jenshaizmann/)
 * (@jenshaizmann)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/in_array-expects-parameter-2-to-be-array-7/)
 * PHP Version: 7.1.19-nmm1
    Wordpress Version: 4.9.8 Plugin Version: 4.13 Current
   Theme: Extra Child
 * **I got the following warning:**
    Warning: in_array() expects parameter 2 to 
   be array, null given in […]/wp-content/plugins/ideapush/inc/pro-ip/idea-push-
   pro.php on line 326
 * Please add the **bold **string
 * if(**is_array($currentUserRole) && **in_array($showBoardTo, $currentUserRole)
   || $showBoardTo == “Everyone”){

Viewing 1 replies (of 1 total)

 *  Plugin Author [Northern Beaches Websites](https://wordpress.org/support/users/northernbeacheswebsites/)
 * (@northernbeacheswebsites)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/in_array-expects-parameter-2-to-be-array-7/#post-10716368)
 * Hi [@jenshaizmann](https://wordpress.org/support/users/jenshaizmann/),
 * Thanks for raising this issue and also coming up with a solution 🙂
 * I have implemented this now. Thanks!

Viewing 1 replies (of 1 total)

The topic ‘in_array() expects parameter 2 to be array’ is closed to new replies.

 * ![](https://ps.w.org/ideapush/assets/icon-256x256.png?rev=1829711)
 * [IdeaPush](https://wordpress.org/plugins/ideapush/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ideapush/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ideapush/)
 * [Active Topics](https://wordpress.org/support/plugin/ideapush/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ideapush/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ideapush/reviews/)

## Tags

 * [array](https://wordpress.org/support/topic-tag/array/)

 * 1 reply
 * 2 participants
 * Last reply from: [Northern Beaches Websites](https://wordpress.org/support/users/northernbeacheswebsites/)
 * Last activity: [7 years, 8 months ago](https://wordpress.org/support/topic/in_array-expects-parameter-2-to-be-array-7/#post-10716368)
 * Status: resolved