From 2b150d38603c8b89443f120666a849a45cd3b9ba Mon Sep 17 00:00:00 2001 From: nikitasinelnikov Date: Tue, 21 Jan 2020 18:27:59 +0200 Subject: [PATCH] - fixed member directory attribute using with callback functions in selectboxes; --- includes/core/class-form.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/core/class-form.php b/includes/core/class-form.php index b7f60ca4..7ccd04f2 100644 --- a/includes/core/class-form.php +++ b/includes/core/class-form.php @@ -103,7 +103,7 @@ if ( ! class_exists( 'um\core\Form' ) ) { $form_fields = UM()->fields()->get_fields(); $arr_options['fields'] = $form_fields; - if ( $arr_options['post']['members_directory'] == 'yes' ) { + if ( isset( $arr_options['post']['members_directory'] ) && $arr_options['post']['members_directory'] == 'yes' ) { $ajax_source_func = $_POST['child_callback']; if ( function_exists( $ajax_source_func ) ) { $arr_options['items'] = call_user_func( $ajax_source_func, $arr_options['field']['parent_dropdown_relationship'] ); @@ -156,7 +156,7 @@ if ( ! class_exists( 'um\core\Form' ) ) { ); } - if( isset( $_POST['child_callback'] ) && ! empty( $_POST['child_callback'] ) && isset( $form_fields[ $_POST['child_name'] ] ) ){ + if ( isset( $_POST['child_callback'] ) && ! empty( $_POST['child_callback'] ) && isset( $form_fields[ $_POST['child_name'] ] ) ){ $ajax_source_func = $_POST['child_callback'];