summaryrefslogtreecommitdiffstats
path: root/app/models/issue.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-03-13 13:00:55 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-03-13 13:00:55 +0000
commit9375f1c3a4ea42a7175febf75da404dbf59aa7b0 (patch)
tree91774cefde8759c751b9fc31db05a6717ac45c67 /app/models/issue.rb
parent72d6b2c8df4f46ac37ceec3563251ab2cdcdb2aa (diff)
downloadredmine-9375f1c3a4ea42a7175febf75da404dbf59aa7b0.tar.gz
redmine-9375f1c3a4ea42a7175febf75da404dbf59aa7b0.zip
Prevent SystemStackError on Issue#all_dependent_issues with mutiple circular dependencies (#7320).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5104 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r--app/models/issue.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 94b4fc0c8..de31aa636 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -455,11 +455,11 @@ class Issue < ActiveRecord::Base
(relations_from + relations_to).sort
end
- def all_dependent_issues(except=nil)
- except ||= self
+ def all_dependent_issues(except=[])
+ except << self
dependencies = []
relations_from.each do |relation|
- if relation.issue_to && relation.issue_to != except
+ if relation.issue_to && !except.include?(relation.issue_to)
dependencies << relation.issue_to
dependencies += relation.issue_to.all_dependent_issues(except)
end