From 14d2a53a67dfa5852fbd0cfb88d0ada8463bd160 Mon Sep 17 00:00:00 2001 From: Chris Darke Date: Tue, 30 Oct 2018 13:08:23 +0000 Subject: [PATCH] Issue #2542066 by oadaeh, ChrisDarke: Fixing the patch submitted in comment #6 to work with PHP 7.1.0, where applying the empty index operator on a string throws a fatal error. --- paragraphs.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paragraphs.module b/paragraphs.module index 4c1ce96..2d49782 100644 --- a/paragraphs.module +++ b/paragraphs.module @@ -1204,7 +1204,7 @@ function theme_paragraphs_field_multiple_value_form($variables) { ); $rows[] = array( 'data' => $cells, - 'class' => array('draggable', drupal_html_class('paragraphs_item_type_' . $item['#bundle'])), + 'class' => !empty($item['#bundle']) ? array('draggable', drupal_html_class('paragraphs_item_type_' . $item['#bundle'])) : array(), ); } @@ -1455,4 +1455,4 @@ function paragraphs_modules_uninstalled($modules) { if (in_array('entitycache', $modules)) { paragraphs_remove_entitycache_table(); } -} \ No newline at end of file +} -- 2.17.1 (Apple Git-112)