aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/entities.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index e35252619..534b61e19 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -376,7 +376,7 @@ function update_entity($guid, $owner_guid, $access_id, $container_guid = null) {
$entity = get_entity($guid);
- if ($entity->canEdit()) {
+ if ($entity && $entity->canEdit()) {
if (trigger_elgg_event('update', $entity->type, $entity)) {
$ret = update_data("UPDATE {$CONFIG->dbprefix}entities set owner_guid='$owner_guid', access_id='$access_id', container_guid='$container_guid', time_updated='$time' WHERE guid=$guid");