Commit f00ccb09 authored by alesr's avatar alesr

Issue #2792031: Undefined property in og_entity_update when updating group

parent d16275a0
......@@ -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