- fixed PHP notices when there aren't UM custom roles and we get bool variable from get_option( 'um_roles' );

This commit is contained in:
nikitasinelnikov
2020-12-16 13:37:13 +02:00
parent 0ee8878f90
commit 41350e1391
10 changed files with 28 additions and 24 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ if ( ! empty( $delete_options ) ) {
}
//remove user role meta
$role_keys = get_option( 'um_roles' );
$role_keys = get_option( 'um_roles', array() );
if ( $role_keys ) {
foreach ( $role_keys as $role_key ) {
delete_option( 'um_role_' . $role_key . '_meta' );