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-3/)
 * 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
 * Any help would be much appreciated. Please feel free to register and see what
   is happening.
    -  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-3%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Jacob Peattie](https://wordpress.org/support/users/jakept/)
 * (@jakept)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-3/#post-10454643)
 * I recommend asking at [https://wordpress.org/support/plugin/ultimate-member-wp-user-frontend-addon](https://wordpress.org/support/plugin/ultimate-member-wp-user-frontend-addon)
   so the plugin’s developers and support community can help you with this.
 *  Thread Starter [dave1rtr](https://wordpress.org/support/users/dave1rtr/)
 * (@dave1rtr)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-3/#post-10454670)
 * Many thanks Jacob, I’ll have a look now 🙂

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

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [dave1rtr](https://wordpress.org/support/users/dave1rtr/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-3/#post-10454670)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
