From e452993c09637ad4849cea65b7bcee215daa73a8 Mon Sep 17 00:00:00 2001 From: icewing Date: Fri, 14 Mar 2008 09:48:05 +0000 Subject: Marcus Povey * Belts and braces git-svn-id: https://code.elgg.org/elgg/trunk@215 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/entities.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engine/lib/entities.php') 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)"); } -- cgit v1.2.3