handling conditionnal anchors to avoid bugs

This commit is contained in:
Antoine M 2023-11-29 18:57:16 +01:00
parent 8d617f1fd4
commit 0063545bbc
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ $customImageUrl = $attributes['imageUrl'] ?? null;
$customImageAlt = $attributes['imageAlt'] ?? null;
$customTitle = $attributes['blockCustomTitle'] ?? null;
$anchor = esc_html($attributes['anchor'])
$anchor = isset($attributes['anchor']) ? esc_html($attributes['anchor']) : null;
?>

View File

@ -9,7 +9,7 @@ $customImageUrl = $attributes['imageUrl'] ?? null;
$customImageAlt = $attributes['imageAlt'] ?? null;
$customTitle = $attributes['blockCustomTitle'] ?? null;
$anchor = esc_html($attributes['anchor'])
$anchor = isset($attributes['anchor']) ? esc_html($attributes['anchor']) : null;
?>