diff --git a/core/relationgraph.class.inc.php b/core/relationgraph.class.inc.php index 54ded174e..14995ec0e 100644 --- a/core/relationgraph.class.inc.php +++ b/core/relationgraph.class.inc.php @@ -457,6 +457,10 @@ class RelationGraph extends SimpleGraph { // Get the upper neighbours $sQuery = $aQueryInfo['sQueryUp']; + if (!$sQuery) + { + throw new Exception("Redundancy cannot be enabled on the relation $sRelCode/{$aQueryInfo['sDefinedInClass']}/{$aQueryInfo['sNeighbour']}: its direction is \"{$aQueryInfo['sDirection']}\""); + } try { $oFlt = static::MakeSearch($sQuery);