aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/entities.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index fe5345bba..da04d2d8f 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -366,6 +366,8 @@
$access_id = (int)$access_id;
$time = time();
+ if ($type=="") throw new InvalidParameterException("Entity type must be set.");
+
return insert_data("INSERT into {$CONFIG->dbprefix}entities (type, subtype, owner_guid, access_id, time_created, time_updated) values ('$type',$subtype, $owner_guid, $access_id, $time, $time)");
}