From 226da79d7763a17d4a2bcd4d9b699e14c9103b9c Mon Sep 17 00:00:00 2001 From: icewing Date: Thu, 20 Mar 2008 15:49:23 +0000 Subject: Marcus Povey * Metadata now using metastrings * Entities will now throw an exception when creation is attempted with no owner git-svn-id: https://code.elgg.org/elgg/trunk@260 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/entities.php | 1 + 1 file changed, 1 insertion(+) (limited to 'engine/lib/entities.php') diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 745b46ee6..e457988ec 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -388,6 +388,7 @@ $time = time(); if ($type=="") throw new InvalidParameterException("Entity type must be set."); + if ($owner_guid==0) throw new InvalidParameterException("owner_guid must not be 0"); 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