From 3cada6f91836d7f9dd3673a14d9be8138bc1d569 Mon Sep 17 00:00:00 2001 From: Axel Rutz Date: Wed, 15 Jun 2016 04:24:06 +0200 Subject: [PATCH] Fixes og on github #130: EntityMalformedException on save --- og.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/og.module b/og.module index 6de5f3780..c9a06d7ab 100755 --- a/og.module +++ b/og.module @@ -760,7 +760,7 @@ function og_form_group_reference_validate($form, &$form_state) { $account = user_load($user->uid); $bundle = $form['#bundle']; - $entity = $form['#entity']; + $entity = isset($form["#$entity_type"]) ? $form["#$entity_type"] : $form['#entity']; list($id) = entity_extract_ids($entity_type, $entity); $op = empty($id) ? 'create' : 'update';