Title: Warning: in_array() expects parameter 2
Last modified: July 2, 2018

---

# Warning: in_array() expects parameter 2

 *  [dave1rtr](https://wordpress.org/support/users/dave1rtr/)
 * (@dave1rtr)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-4/)
 * Hi.
    My website is not live as yet, I am just setting up and testing. The problem
   I am having is in the Members/User pages. The members profile shows but I am 
   getting the warning message……
 * “Warning: in_array() expects parameter 2 to be array, string given in /mounted-
   storage/home94a/sub008/sc10385/rtraoldham.com/team1rtr/wp-content/plugins/ultimate-
   member-wp-user-frontend-addon/actions.php on line 62”
 * The offending line reads………
 * if(!um_is_myprofile() || !in_array($role, $roles[‘roles’])){
 * I have not got a clue what any of this means and I can’t find anything in the
   forums with errors in the actions.php
 * I have the latest version of WordPress installed with the following plugins…
   
   Ultimate Member with UM Gallery extension and Ultimate Member + WP User Frontend–
   Addon
 * Please feel free to test register and see what is happening.
    Any help would 
   be much appreciated
    -  This topic was modified 7 years, 11 months ago by [dave1rtr](https://wordpress.org/support/users/dave1rtr/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwarning-in_array-expects-parameter-2-4%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Dominik](https://wordpress.org/support/users/trasek/)
 * (@trasek)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-4/#post-10526801)
 * Hey! It’s just warning. We will try remove it in next update! Thanks!
 * When you’ll disable WordPress debug, it’ll disappear.
    -  This reply was modified 7 years, 10 months ago by [Dominik](https://wordpress.org/support/users/trasek/).

Viewing 1 replies (of 1 total)

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

 * ![](https://s.w.org/plugins/geopattern-icon/ultimate-member-wp-user-frontend-
   addon.svg)
 * [Ultimate Member + WP User Frontend - Addon](https://wordpress.org/plugins/ultimate-member-wp-user-frontend-addon/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-member-wp-user-frontend-addon/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-member-wp-user-frontend-addon/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-member-wp-user-frontend-addon/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-member-wp-user-frontend-addon/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-member-wp-user-frontend-addon/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Dominik](https://wordpress.org/support/users/trasek/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-4/#post-10526801)
 * Status: not resolved