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

---

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

 *  Resolved [Peter](https://wordpress.org/support/users/hardpeter4u/)
 * (@hardpeter4u)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-4/)
 * Hi,
 * I’ve installed your plugin and get the following warnings:
 *     ```
       Warning: in_array() expects parameter 2 to be array, string given in /home3/me/public_html/wp/wp-content/plugins/friends-for-bbpress/friends.php on line 166
       AND
       Warning: in_array() expects parameter 2 to be array, string given in /home3/hardpete/public_html/wp/wp-content/plugins/friends-for-bbpress/friends.php on line 232 (many lines of this one)
       ```
   
 * Any Ideas on what the cause of this is?
 * Thanks,
 * Pete
 * [https://wordpress.org/plugins/friends-for-bbpress/](https://wordpress.org/plugins/friends-for-bbpress/)

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

 *  Plugin Author [GraemeScott](https://wordpress.org/support/users/graemescott/)
 * (@graemescott)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-4/#post-5907076)
 * Hi Peter,
 * Thanks for pointing this out to me. I have fixed the errors so just download 
   the updated version of the plugin and you should be good to go.
 * Let me know if the update gets rid of the warning on your end,
    Graeme
 *  Thread Starter [Peter](https://wordpress.org/support/users/hardpeter4u/)
 * (@hardpeter4u)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-4/#post-5907079)
 * Hi,
 * Is the plugin updated? It still says the same version 1.0?
 * Got no notification in WordPress plugins that there was a new version.
 * Thanks,
 * Peter
 *  Thread Starter [Peter](https://wordpress.org/support/users/hardpeter4u/)
 * (@hardpeter4u)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-4/#post-5907080)
 * Hi again,
 * I deleted plugin and re-uploaded and activated. No warnings this time so you 
   must have fixed it.
 * Thanks,
    Peter
 *  Plugin Author [GraemeScott](https://wordpress.org/support/users/graemescott/)
 * (@graemescott)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-4/#post-5907091)
 * Hi Peter,
 * Sorry about that, this is my first plugin so I’m still trying to figure out how
   everything works haha. Thanks for letting me know that it didn’t send you an 
   update when I changed the code, I’ll make sure that happens in the future.
 * Enjoy the plugin,
    Graeme

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

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

 * ![](https://s.w.org/plugins/geopattern-icon/friends-for-bbpress_638ca6.svg)
 * [Friends For bbPress](https://wordpress.org/plugins/friends-for-bbpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/friends-for-bbpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/friends-for-bbpress/)
 * [Active Topics](https://wordpress.org/support/plugin/friends-for-bbpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/friends-for-bbpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/friends-for-bbpress/reviews/)

## Tags

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

 * 4 replies
 * 2 participants
 * Last reply from: [GraemeScott](https://wordpress.org/support/users/graemescott/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-4/#post-5907091)
 * Status: resolved