aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/entities.php
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-14 09:48:05 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-14 09:48:05 +0000
commite452993c09637ad4849cea65b7bcee215daa73a8 (patch)
treec7dd6357f4bbb5830b689d6137646016483dad9d /engine/lib/entities.php
parent4b7d06e1f39331b1fbbcfeb79f2a216544e07c8a (diff)
downloadelgg-e452993c09637ad4849cea65b7bcee215daa73a8.tar.gz
elgg-e452993c09637ad4849cea65b7bcee215daa73a8.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* Belts and braces git-svn-id: https://code.elgg.org/elgg/trunk@215 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/entities.php')
-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)");
}