mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- 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:
@@ -633,7 +633,7 @@ if ( ! class_exists( 'um\core\Builtin' ) ) {
|
||||
function set_predefined_fields() {
|
||||
|
||||
global $wp_roles;
|
||||
$role_keys = get_option( 'um_roles' );
|
||||
$role_keys = get_option( 'um_roles', array() );
|
||||
if ( ! empty( $role_keys ) && is_array( $role_keys ) ) {
|
||||
$role_keys = array_map( function( $item ) {
|
||||
return 'um_' . $item;
|
||||
|
||||
Reference in New Issue
Block a user