Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the bug with object use as array in fe_nodequeue #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions nems-platform.make
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
17 changes: 17 additions & 0 deletions patches/features_extra-fe_nodequeue_fix_object_use_as_array.patch
Original file line number Diff line number Diff line change
@@ -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;
}
2 changes: 2 additions & 0 deletions post-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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...
Expand Down