Commit 7d9726e9 authored by Julian Pustkuchen's avatar Julian Pustkuchen Committed by Thomas Frobieter
Browse files

Issue #3302578: Warning: Undefined array key "#suffix" in...

Issue #3302578: Warning: Undefined array key "#suffix" in drowl_paragraphs_type_markup_preprocess_paragraph__markup() (line 11 of modules/contrib/drowl_paragraphs/modules/drowl_paragraphs_type_markup/drowl_paragraphs_type_markup.module).
parent fc84b2e9
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -12,6 +12,11 @@ function drowl_paragraphs_type_markup_preprocess_paragraph__markup(&$variables)
  // we add the empty-check-workaround. Typically markup like Javascript
  // might not have visual output, but should be rendered anyway!
  if (!empty($variables['content']['field_paragraphs_markup'][0])) {
    // Create #suffix array key, if it doesn't exist:
    if(!isset($variables['content']['field_paragraphs_markup'][0]['#suffix'])){
      $variables['content']['field_paragraphs_markup'][0]['#suffix'] = '';
    }
    // Append the empty-check-workaround:
    $variables['content']['field_paragraphs_markup'][0]['#suffix'] .= '<span class="empty-check-workaround element-hidden">&nbsp;</span>';
  }
}