aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggRiverItem.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes/ElggRiverItem.php')
-rw-r--r--engine/classes/ElggRiverItem.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/engine/classes/ElggRiverItem.php b/engine/classes/ElggRiverItem.php
index cdb22239d..fcc8f9c85 100644
--- a/engine/classes/ElggRiverItem.php
+++ b/engine/classes/ElggRiverItem.php
@@ -28,8 +28,14 @@ class ElggRiverItem
// throw exception
}
+ // the casting is to support typed serialization like json
+ $int_types = array('id', 'subject_guid', 'object_guid', 'annotation_id', 'access_id', 'posted');
foreach ($object as $key => $value) {
- $this->$key = $value;
+ if (in_array($key, $int_types)) {
+ $this->$key = (int)$value;
+ } else {
+ $this->$key = $value;
+ }
}
}