diff options
author | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-04-15 11:35:11 +0000 |
---|---|---|
committer | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-04-15 11:35:11 +0000 |
commit | 374c06ce3525857aa717d07b0050ca58163e3488 (patch) | |
tree | 9d6b8c4f5f86f3b34552ba0c60aa772de72f8d14 | |
parent | ed30dc692fd714acb471927fe3c326e25c75d53e (diff) | |
download | elgg-374c06ce3525857aa717d07b0050ca58163e3488.tar.gz elgg-374c06ce3525857aa717d07b0050ca58163e3488.tar.bz2 |
Marcus Povey <marcus@dushka.co.uk>
* Belts and braces
git-svn-id: https://code.elgg.org/elgg/trunk@451 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/lib/entities.php | 3 |
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'); |