Skip to content

Commit

Permalink
Mitigate some warnings related to block output
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Thulin committed Aug 11, 2023
1 parent 2da07bf commit 80f22d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/Admin/Gutenberg/Blocks/BlockManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ public function renderContainerCallback($block)
$data['classList'] = $this->buildBlockClassList($block);

$data['contentClassList'] = 'o-container';
if ($data['content_width'] == 'article') {
if (isset($data['content_width']) && $data['content_width'] == 'article') {
$data['contentClassList'] .= ' c-article c-article--readable-width';
}

if ($this->validateFields($block['data']) || in_array($block['name'], $this->noValidationRequired)) {
$data['style'] = [];

if (!empty($data['color']) && $data['background_color_type'] != 'gradient') {
if (!empty($data['color']) && isset ($data['background_color_type']) && $data['background_color_type'] != 'gradient') {
$data['style'][] = "background-color:{$data['color']}";
}
if (!empty($data['text_color'])) {
Expand Down

0 comments on commit 80f22d6

Please sign in to comment.