The problem is that when a contact is erased, the relationships that are initiated from this contact are deleted properly, but relationships that are initiated from another person are not. Simple fix included below.
--- Relationships.plugin.php (revision 7837)
+++ Relationships.plugin.php (working copy)
@@ -258,6 +258,7 @@
// delete all relationships owned by this contact
$id = $contact->contact['id'];
$db->query("DELETE FROM `{$CONFIG_DB_PREFIX}Relationships` WHERE ownerId=$id");
+ $db->query("DELETE FROM `{$CONFIG_DB_PREFIX}Relationships` WHERE relatedToId=$id");
return;
}
applied in rev 673