From bbbe6812fdfdff7aa80aa6ec6e2e455848d10a18 Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Tue, 5 Dec 2023 02:05:44 +0200 Subject: [PATCH] - fixed #1372; --- includes/core/class-fields.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/includes/core/class-fields.php b/includes/core/class-fields.php index 3f15471e..76fb913c 100644 --- a/includes/core/class-fields.php +++ b/includes/core/class-fields.php @@ -1628,6 +1628,10 @@ if ( ! class_exists( 'um\core\Fields' ) ) { $array = ( isset( UM()->builtin()->predefined_fields[ $key ] ) ) ? UM()->builtin()->predefined_fields[ $key ] : UM()->builtin()->all_user_fields[ $key ]; } + if ( empty( $array['type'] ) { + return ''; + } + $array['classes'] = null; if ( ! isset( $array['placeholder'] ) ) { @@ -4121,7 +4125,7 @@ if ( ! class_exists( 'um\core\Fields' ) ) { // find rows foreach ( $this->get_fields as $key => $array ) { - if ( $array['type'] == 'row' ) { + if ( isset( $array['type'] ) && 'row' === $array['type'] ) { $this->rows[ $key ] = $array; unset( $this->get_fields[ $key ] ); // not needed anymore } @@ -4662,7 +4666,7 @@ if ( ! class_exists( 'um\core\Fields' ) ) { // find rows foreach ( $this->get_fields as $key => $array ) { - if ( $array['type'] == 'row' ) { + if ( isset( $array['type'] ) && 'row' === $array['type'] ) { $this->rows[ $key ] = $array; unset( $this->get_fields[ $key ] ); // not needed anymore }