diff options
author | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-04-15 15:05:58 +0000 |
---|---|---|
committer | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-04-15 15:05:58 +0000 |
commit | 229c9b8a8cf1bc99aa915473f856ba471e9dfb45 (patch) | |
tree | 4623bfd6c0906a5a7f04b3368cb9f5d4862c00fb /engine/lib/relationships.php | |
parent | 8a0ab3d2754d4799329d48b9c7f9ca18508f4d73 (diff) | |
download | elgg-229c9b8a8cf1bc99aa915473f856ba471e9dfb45.tar.gz elgg-229c9b8a8cf1bc99aa915473f856ba471e9dfb45.tar.bz2 |
Marcus Povey <marcus@dushka.co.uk>
* Modified to not throw exception on missing verb conversion
git-svn-id: https://code.elgg.org/elgg/trunk@461 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/relationships.php')
-rw-r--r-- | engine/lib/relationships.php | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/engine/lib/relationships.php b/engine/lib/relationships.php index bba930580..592e3ecea 100644 --- a/engine/lib/relationships.php +++ b/engine/lib/relationships.php @@ -149,16 +149,18 @@ // Map verb to relationship $verb = $data->getAttribute('verb'); - $this->attributes['relationship'] = get_relationship_from_verb($verb); - if (!$this->attributes['relationship']) - throw new ImportException("Could not import '$verb' as a relationship."); - - // save - $result = $this->save(); - if (!$result) - throw new ImportException("There was a problem saving the ElggExtender"); + $relationship = get_relationship_from_verb($verb); - return $this; + if ($relationship) + { + $this->attributes['relationship'] = $relationship; + // save + $result = $this->save(); + if (!$result) + throw new ImportException("There was a problem saving the ElggExtender"); + + return $this; + } } } } |