From: Tara L Andrews Date: Fri, 3 Feb 2012 20:45:32 +0000 (+0100) Subject: zap undefined value warning X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=84d4ca783d20c1606c29cc83e1c41c09ddd888f2;p=scpubgit%2Fstemmatology.git zap undefined value warning --- diff --git a/lib/Text/Tradition/Collation/RelationshipStore.pm b/lib/Text/Tradition/Collation/RelationshipStore.pm index 93c4699..a74c890 100644 --- a/lib/Text/Tradition/Collation/RelationshipStore.pm +++ b/lib/Text/Tradition/Collation/RelationshipStore.pm @@ -259,7 +259,9 @@ sub relationship_valid { # Check that linking the source and target in a relationship won't lead # to a path loop for any witness. If they have the same rank then fine. return( 1, "ok" ) - if $c->reading( $source )->rank == $c->reading( $target )->rank; + if $c->reading( $source )->has_rank + && $c->reading( $target )->has_rank + && $c->reading( $source )->rank == $c->reading( $target )->rank; # Otherwise, first make a lookup table of all the # readings related to either the source or the target.