From e825e376967db60e57a04d90fc8c7b40c50be527 Mon Sep 17 00:00:00 2001 From: Marton Kiss Date: Wed, 30 Aug 2017 22:58:52 +0200 Subject: [PATCH] Fix flag module unsupported operand types issue The flag module had an issue on php5.5.9, this patch applies a fix for that. https://www.drupal.org/node/2347297 Change-Id: Icdd619da23e7f38e5577b464d231aa1903226721 --- commons.make | 1 + ...20-commons-flag-unsupported-operands.patch | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 patches/0020-commons-flag-unsupported-operands.patch diff --git a/commons.make b/commons.make index eb043aa..eb77c9a 100644 --- a/commons.make +++ b/commons.make @@ -17,3 +17,4 @@ projects[commons][patch][] = "patches/0016-commons-file_entity-2.3.patch" projects[commons][patch][] = "patches/0017-commons-media-2.9.patch" projects[commons][patch][] = "patches/0018-commons-views-3.18.patch" projects[commons][patch][] = "patches/0019-commons-entity-reference-1.5.patch" +projects[commons][patch][] = "patches/0020-commons-flag-unsupported-operands.patch" diff --git a/patches/0020-commons-flag-unsupported-operands.patch b/patches/0020-commons-flag-unsupported-operands.patch new file mode 100644 index 0000000..88c66f3 --- /dev/null +++ b/patches/0020-commons-flag-unsupported-operands.patch @@ -0,0 +1,30 @@ +diff -Naur commons.orig/drupal-org.make commons/drupal-org.make +--- commons.orig/drupal-org.make 2017-08-30 21:45:23.000000000 +0200 ++++ commons/drupal-org.make 2017-08-30 22:13:43.000000000 +0200 +@@ -161,6 +161,10 @@ + projects[flag][subdir] = "contrib" + projects[flag][version] = "3.9" + ++; Fix Fatal error: Unsupported operand types in flag_flag.inc on line 132 ++; https://www.drupal.org/node/2347297 ++projects[flag][patch][] = "patches/0001-commons-flag-fix-unsupported-operands.patch" ++ + projects[flag_abuse][type] = "module" + projects[flag_abuse][subdir] = "contrib" + projects[flag_abuse][version] = "2.0" +diff -Naur commons.orig/patches/0001-commons-flag-fix-unsupported-operands.patch commons/patches/0001-commons-flag-fix-unsupported-operands.patch +--- commons.orig/patches/0001-commons-flag-fix-unsupported-operands.patch 1970-01-01 01:00:00.000000000 +0100 ++++ commons/patches/0001-commons-flag-fix-unsupported-operands.patch 2017-08-30 22:12:48.000000000 +0200 +@@ -0,0 +1,12 @@ ++diff -Naur a/includes/flag/flag_flag.inc b/includes/flag/flag_flag.inc ++--- a/includes/flag/flag_flag.inc 2017-08-30 21:45:26.000000000 +0200 +++++ b/includes/flag/flag_flag.inc 2017-08-30 21:48:09.000000000 +0200 ++@@ -129,7 +129,7 @@ ++ ++ // Populate the options with the defaults. ++ $options = (array) unserialize($row->options); ++- $options += $flag->options(); +++ $options = array_merge($options, $flag->options()); ++ ++ // Make the unserialized options accessible as normal properties. ++ foreach ($options as $option => $value) {