- fix fatal error 2.0-beta1 package update

This commit is contained in:
ashubawork
2025-07-30 13:09:54 +03:00
parent a50ab63067
commit 4522e6d64c
@@ -25,7 +25,7 @@ foreach ( $forms as $form_id ) {
delete_post_meta( $form_id, "_um_{$form_type}_use_globals" );
$role_slug = get_post_meta( $form_id, "_um_{$form_type}_role", true );
if ( $role_slug && array_key_exists( $role_slug, $roles_associations ) ) {
if ( $role_slug && is_array( $roles_associations ) && array_key_exists( $role_slug, $roles_associations ) ) {
update_post_meta( $form_id, "_um_{$form_type}_role", $roles_associations[ $role_slug ] );
}
}