aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/entities.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index f602297cf..559701406 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -432,6 +432,9 @@
*/
public function import(ODD $data)
{
+ if (!($data instanceof ODDEntity))
+ throw new InvalidParameterException("ElggEntity::import() passed an unexpected ODD class");
+
// Set type and subtype
$this->attributes['type'] = $data->getAttribute('class');
$this->attributes['subtype'] = $data->getAttribute('subclass');