From 703f6de45b8dd20406bb41a3a41d6ea3e9f23d07 Mon Sep 17 00:00:00 2001 From: Naveen Giri <1naveengiri@gmail.com> Date: Thu, 23 Nov 2023 15:07:29 +0530 Subject: [PATCH] Add fix for code warnings --- includes/class-profile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-profile.php b/includes/class-profile.php index c2ad2d8a..9ac1d4d6 100644 --- a/includes/class-profile.php +++ b/includes/class-profile.php @@ -383,7 +383,7 @@ public function get_field_value( $field, $user ) { if ( $field->field_type_key != 'country' && $field->field_type_key != 'uwp_country' ) { if ( ! empty( $value ) ) { $data = $this->uwp_array_search( $option_values_arr, 'value', $value ); - $value = $data[0]['label']; + $value = !empty( $data[0]['label'] ) ? $data[0]['label'] : ''; } else { $value = ''; }