Navigation Menu

Skip to content

Commit

Permalink
Fix circular dependencies in Relationship Graph
Browse files Browse the repository at this point in the history
In the case where we have a cycle in parent-child relationships (i.e.
A -> B -> C -> A), the Relationship Graph fails with an INTERNAL
APPLICATION ERROR - Argument 1 passed to relgraph_add_child() must be of
type array, string given in core/relationship_graph_api.php line 427.

The recursive call was passing the bug id instead of the bug list.

Fixes #11381
  • Loading branch information
dregad committed Feb 2, 2020
1 parent 6568294 commit f07fea0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/relationship_graph_api.php
Expand Up @@ -424,7 +424,7 @@ function relgraph_add_child( array &$p_bug_list, $p_bug_id ) {
$p_bug_list[$p_bug_id]->is_descendant = true;

foreach( $p_bug_list[$p_bug_id]->children as $t_child ) {
relgraph_add_child( $p_bug_id, $t_child );
relgraph_add_child( $p_bug_list, $t_child );
}
}
} else {
Expand Down

0 comments on commit f07fea0

Please sign in to comment.