Unverified Commit 81cd92d0 authored by alesr's avatar alesr Committed by GitHub

Merge pull request #353 from alesrebec/7.x-2.x

Undefined property stdClass::$original in og_entity_update when updating group
parents 51e15f1a f00ccb09
......@@ -885,10 +885,10 @@ function og_entity_update($entity, $entity_type) {
}
}
}
$original_entity = $entity->original;
$original_entity = isset($entity->original) ? $entity->original : NULL;
$property = OG_DEFAULT_ACCESS_FIELD;
if (!empty($entity->{$property}) && $entity->{$property} != $original_entity->{$property}) {
if (!empty($entity->{$property}) && !empty($original_entity->{$property}) && $entity->{$property} != $original_entity->{$property}) {
if (!og_is_group_default_access($entity_type, $entity)) {
// Override default roles.
og_roles_override($entity_type, $bundle, $id);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment