aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/entities.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-10 19:00:20 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-10 19:00:20 +0000
commit19bf7926bab6e5280c45fb9d3039d038bdfaf383 (patch)
tree82758162f219569719d17031cf5e59852569195e /engine/lib/entities.php
parentbd011bb478a9a346db70b79576e205e19dfe1875 (diff)
downloadelgg-19bf7926bab6e5280c45fb9d3039d038bdfaf383.tar.gz
elgg-19bf7926bab6e5280c45fb9d3039d038bdfaf383.tar.bz2
Checking for a valid entity before using its methods in update_entity().
git-svn-id: http://code.elgg.org/elgg/trunk@7049 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/entities.php')
-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");