aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-14 10:45:02 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-14 10:45:02 +0000
commit2612c81c6fa8b2e5fc548b01e11eae47c8f2e72e (patch)
treeac7f5924bff7457f1079c482666e91aa7014464c /engine
parente452993c09637ad4849cea65b7bcee215daa73a8 (diff)
downloadelgg-2612c81c6fa8b2e5fc548b01e11eae47c8f2e72e.tar.gz
elgg-2612c81c6fa8b2e5fc548b01e11eae47c8f2e72e.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* Belts and braces git-svn-id: https://code.elgg.org/elgg/trunk@216 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/sites.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/engine/lib/sites.php b/engine/lib/sites.php
index 2a88deff1..6dfbb3063 100644
--- a/engine/lib/sites.php
+++ b/engine/lib/sites.php
@@ -100,10 +100,14 @@ error_log("Creating by $guid");
// Test to see if we have the generic stuff
if (!parent::load($guid))
return false;
+
+ // Check the type
+ if ($this->attributes['type']!='site')
+ throw new InvalidClassException("GUID:$guid is not a valid ElggSite");
// Load missing data
$row = get_site_entity_as_row($guid);
-
+
// Now put these into the attributes array as core values
$objarray = (array) $row;
foreach($objarray as $key => $value)