aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/relationships.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/relationships.php')
-rw-r--r--engine/lib/relationships.php20
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;
+ }
}
}
}