Errors when there are no groups or when groups have no users
-
I’ve been getting the following warning on user edit pages.
Warning: in_array() expects parameter 2 to be array, string given in /.../wp-content/plugins/edit-flow/modules/user-groups/user-groups.php on line 1046I decided to wipe out the user groups to get past this for now but when i saved I got an error about having no user groups.
For now I updated user-groups.php to have a check:
if ( is_array( $all_usergroups ) && count( $all_usergroups ) ) foreach( $all_usergroups as $usergroup ) { if ( in_array( $usergroup->term_id, $usergroups ) ) $this->add_user_to_usergroup( $user->ID, $usergroup->term_id ); else $this->remove_user_from_usergroup( $user->ID, $usergroup->term_id ); }I have not had a chance to see if this is because of some other plugin, etc. but it seems to me it would be best to have these kinds of checks baked in.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Errors when there are no groups or when groups have no users’ is closed to new replies.