diff --git a/nems-platform.make b/nems-platform.make index afb0f64..fdf3d7b 100644 --- a/nems-platform.make +++ b/nems-platform.make @@ -28,6 +28,7 @@ projects[eva][version] = "1.2" projects[features_extra][subdir] = "contrib" projects[features_extra][version] = "1.0" +projects[features_extra][patch][] = patches/features_extra-fe_nodequeue_fix_object_use_as_array.patch projects[features_roles_permissions][subdir] = "contrib" projects[features_roles_permissions][version] = "1.2" diff --git a/patches/features_extra-fe_nodequeue_fix_object_use_as_array.patch b/patches/features_extra-fe_nodequeue_fix_object_use_as_array.patch new file mode 100644 index 0000000..b8e38eb --- /dev/null +++ b/patches/features_extra-fe_nodequeue_fix_object_use_as_array.patch @@ -0,0 +1,17 @@ +diff --git a/fe_nodequeue.module b/fe_nodequeue.module +index 0fa6afd..9b86f8d 100644 +--- a/fe_nodequeue.module ++++ b/fe_nodequeue.module +@@ -133,6 +133,12 @@ function fe_nodequeue_features_revert($module) { + + // Revert. + foreach ($defaults as $object) { ++ ++ // Fix the bug "Cannot use object of type stdclass as array". ++ if ((isset($object)) && (is_object($object))) { ++ $object = (array)$object; ++ } ++ + if (empty($object['name'])) { + continue; + } diff --git a/post-install.sh b/post-install.sh index b38aa99..b0383b6 100755 --- a/post-install.sh +++ b/post-install.sh @@ -8,10 +8,12 @@ rm -f resources/nems-platform.make # Create clean folders mkdir lib/features/nems mkdir lib/themes/nems +mkdir resources/patches # Copy the sources in place. cp -r vendor/ec-europa/nems-platform/modules/features/* lib/features/nems cp -r vendor/ec-europa/nems-platform/themes/* lib/themes/nems +cp -r vendor/ec-europa/nems-platform/patches/* resources/patches cp vendor/ec-europa/nems-platform/nems-platform.make resources/nems-platform.make echo NEMS Sources copied...