From cc959e62bc4e4287c4fb9290023ea82af061f1d7 Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Tue, 7 Feb 2017 10:25:56 +0100 Subject: [PATCH] patched field_group module for php7 compatibility --- patches.d/field_group-php7-2661484-2.patch | 13 +++++++++++++ patches.md | 3 +++ .../contrib/fields/field_group/field_group.module | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 patches.d/field_group-php7-2661484-2.patch create mode 100644 patches.md diff --git a/patches.d/field_group-php7-2661484-2.patch b/patches.d/field_group-php7-2661484-2.patch new file mode 100644 index 00000000..87654f2c --- /dev/null +++ b/patches.d/field_group-php7-2661484-2.patch @@ -0,0 +1,13 @@ +diff --git a/field_group.module b/field_group.module +index 412825f..4061519 100644 +--- a/field_group.module ++++ b/field_group.module +@@ -2258,7 +2258,7 @@ function field_group_field_group_to_hook_code($data, $module) { + $code .= " \${$export['identifier']}s = array();\n\n"; + foreach ($objects as $object) { + $code .= ctools_export_object('field_group', $object, ' '); +- $code .= " \${$export['identifier']}s['" . check_plain($object->$export['key']) . "'] = \${$export['identifier']};\n\n"; ++ $code .= " \${$export['identifier']}s['" . check_plain($object->{$export['key']}) . "'] = \${$export['identifier']};\n\n"; + if (!empty($object->data['label'])) { + $translatables[] = $object->data['label']; + } diff --git a/patches.md b/patches.md new file mode 100644 index 00000000..325a3d7b --- /dev/null +++ b/patches.md @@ -0,0 +1,3 @@ +# Field group +compatibility with php 7 +https://www.drupal.org/node/2661484 diff --git a/sites/all/modules/contrib/fields/field_group/field_group.module b/sites/all/modules/contrib/fields/field_group/field_group.module index 412825f4..4061519f 100644 --- a/sites/all/modules/contrib/fields/field_group/field_group.module +++ b/sites/all/modules/contrib/fields/field_group/field_group.module @@ -2258,7 +2258,7 @@ function field_group_field_group_to_hook_code($data, $module) { $code .= " \${$export['identifier']}s = array();\n\n"; foreach ($objects as $object) { $code .= ctools_export_object('field_group', $object, ' '); - $code .= " \${$export['identifier']}s['" . check_plain($object->$export['key']) . "'] = \${$export['identifier']};\n\n"; + $code .= " \${$export['identifier']}s['" . check_plain($object->{$export['key']}) . "'] = \${$export['identifier']};\n\n"; if (!empty($object->data['label'])) { $translatables[] = $object->data['label']; }