From 374c06ce3525857aa717d07b0050ca58163e3488 Mon Sep 17 00:00:00 2001 From: icewing Date: Tue, 15 Apr 2008 11:35:11 +0000 Subject: Marcus Povey * Belts and braces git-svn-id: https://code.elgg.org/elgg/trunk@451 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/entities.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engine') 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'); -- cgit v1.2.3