Skip to content

Commit

Permalink
KAD-4150 handle undefined key
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbert-hernandez committed Feb 12, 2025
1 parent fce3899 commit 0665efc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion includes/class-kadence-blocks-css.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 0665efc

Please sign in to comment.