aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/metadata.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php
index 6fd95f61c..56bb83990 100644
--- a/engine/lib/metadata.php
+++ b/engine/lib/metadata.php
@@ -307,12 +307,13 @@
foreach ($results as $r)
{
+
switch ($r->object_type)
{
- case 'object' : $objects[] = new ElggObject($r->object_id); break;
- case 'user' : $objects[] = new ElggUser($r->object_id); break;
- case 'collection' : $objects[] = new ElggCollection($r->object_id); break;
- case 'site' : $objects[] = new ElggSite($r->object_id); break;
+ case 'object' : $objects[] = new ElggObject((int)$r->object_id); break;
+ case 'user' : $objects[] = new ElggUser((int)$r->object_id); break;
+ case 'collection' : $objects[] = new ElggCollection((int)$r->object_id); break;
+ case 'site' : $objects[] = new ElggSite((int)$r->object_id); break;
default: default : throw new InstallationException("Type {$r->object_type} is not supported. This indicates an error in your installation, most likely caused by an incomplete upgrade.");
}
}