Browse Source

Have dependency graph throw an exception rather than return nothing when no edge nodes are present

master
Adam Pippin 3 years ago
parent
commit
1cdadf4521
  1. 5
      app/Util/DependencyGraph.php

5
app/Util/DependencyGraph.php

@ -105,6 +105,11 @@ class DependencyGraph
}
}
if (sizeof($state) == 0)
{
throw new \Exception('Cannot solve dependency graph -- no edge nodes. Circular dependency?');
}
// Then walk through the array and insert each node's dependencies before
// it recursively.
$iter = 0;

Loading…
Cancel
Save