From 21b37954c48e6b9c7d957647cff79f720eaf0255 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 27 Sep 2007 08:49:20 +0000 Subject: [PATCH] finding all groups or users don't fail if one invalid group --- lib/WebGUI/Group.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/WebGUI/Group.pm b/lib/WebGUI/Group.pm index 7714e4f3e..c6de9f157 100755 --- a/lib/WebGUI/Group.pm +++ b/lib/WebGUI/Group.pm @@ -513,8 +513,11 @@ sub getAllGroupsFor { my $self = shift; my $groups = $self->getGroupsFor(); foreach my $gid (@{ $groups }) { - push @{ $groups }, @{ WebGUI::Group->new($self->session, $gid)->getAllGroupsFor() }; - } + my $group = WebGUI::Group->new($self->session, $gid); + if ($group) { + push @{ $groups }, @{ $group->getAllGroupsFor() }; + } + } my %unique = map { $_ => 1 } @{ $groups }; $groups = [ keys %unique ]; return $groups;