From 0665efc1fc56606e9a850581823a5e6de377e3fd Mon Sep 17 00:00:00 2001 From: gilbert-hernandez Date: Wed, 12 Feb 2025 12:34:40 -0700 Subject: [PATCH] KAD-4150 handle undefined key --- includes/class-kadence-blocks-css.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/class-kadence-blocks-css.php b/includes/class-kadence-blocks-css.php index 24fefb91b..9a5cdb3f6 100644 --- a/includes/class-kadence-blocks-css.php +++ b/includes/class-kadence-blocks-css.php @@ -1393,7 +1393,12 @@ public function render_row_gap_property( $attributes, $name = array( 'gap', 'tab $attributes[ $name[2] ] = $attributes[ $name[1] ]; } if ( $attributes[ $name[1] ] === 'custom' && empty( $attributes[ $custom ][1] ) ) { - $attributes[ $custom ][1] = $attributes[ $custom ][0]; + if (isset($attributes[$custom][0])) { + $attributes[$custom][1] = $attributes[$custom][0]; + } else { + // Handle the scenario where $attributes[$custom][0] is not set. + $attributes[$custom][1] = ''; // Default empty string. + } } if ( $attributes[ $name[2] ] === 'custom' && empty( $attributes[ $custom ][2] ) ) { $attributes[ $custom ][2] = $attributes[ $custom ][1];