diff options
author | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-20 15:49:23 +0000 |
---|---|---|
committer | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-20 15:49:23 +0000 |
commit | 226da79d7763a17d4a2bcd4d9b699e14c9103b9c (patch) | |
tree | 77695bdf9ab5cbf56b51c9d1ede5ff89f1581e3b /engine/lib/entities.php | |
parent | f00c9393e830c156cdff7322eab3b26eb3dcbe1a (diff) | |
download | elgg-226da79d7763a17d4a2bcd4d9b699e14c9103b9c.tar.gz elgg-226da79d7763a17d4a2bcd4d9b699e14c9103b9c.tar.bz2 |
Marcus Povey <marcus@dushka.co.uk>
* 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
Diffstat (limited to 'engine/lib/entities.php')
-rw-r--r-- | engine/lib/entities.php | 1 |
1 files changed, 1 insertions, 0 deletions
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)"); } |