aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/objects.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/objects.php')
-rw-r--r--engine/lib/objects.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/engine/lib/objects.php b/engine/lib/objects.php
index 63d0f5cef..f186c66cb 100644
--- a/engine/lib/objects.php
+++ b/engine/lib/objects.php
@@ -52,11 +52,8 @@ function create_object_entity($guid, $title, $description) {
if ($result != false) {
// Update succeeded, continue
$entity = get_entity($guid);
- if (elgg_trigger_event('update', $entity->type, $entity)) {
- return $guid;
- } else {
- $entity->delete();
- }
+ elgg_trigger_event('update', $entity->type, $entity);
+ return $guid;
}
} else {
// Update failed, attempt an insert.