aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/sites.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/engine/lib/sites.php b/engine/lib/sites.php
index 294ed9c8f..ff8235b34 100644
--- a/engine/lib/sites.php
+++ b/engine/lib/sites.php
@@ -45,7 +45,9 @@
else if (is_string($id))
$site = get_site_byurl($id); // Otherwise assume URL
else if ($id instanceof stdClass)
- $site = $id; // This is a db row, so serialise directly
+ $site = $id; // This is a db row, so serialise directly
+ else if ($id instanceof ElggSite)
+ $site = $id;
else
throw new InvalidParameterException("Unrecognised or unsupported type passed to ElggSite constructor.");