error: expects array, string given
-
I’m getting this message:
Warning: in_array() expects parameter 2 to be array, string given in /home4/slap1fe8/public_html/wp-content/plugins/wp-user-frontend-pro/includes/content-restriction.php on line 302
This is the code before/after (I added “Line 302” to indicate)
if ( ‘loggedin’ == $type ) {
$current_user_info = get_userdata( get_current_user_id() );
$current_user_roles = $current_user_info->roles;foreach ($current_user_roles as $role) {
LINE 302 if ( in_array( $role, $allowed_roles ) ) {
$user_exist = true;
break;
}else{
$user_exist = false;
}
}
- The topic ‘error: expects array, string given’ is closed to new replies.