Do not call group methods on an undefined value. IOW, do not assume that we got a group.

This commit is contained in:
Colin Kuskie 2011-06-28 17:16:09 -07:00
parent 3fa9d82bcd
commit 814845b7f1
2 changed files with 3 additions and 1 deletions

View file

@ -1,4 +1,5 @@
7.10.20
- fixed: Do not call group methods on an undefined value.
7.10.19
- fixed #12169: extras uploads symlink export

View file

@ -684,8 +684,9 @@ sub getGroupIdsRecursive {
my $self = shift;
my $groupingIds = $self->getGroups( "withoutExpired" );
my %groupIds = map { $_ => 1 } @{ $groupingIds };
while ( my $groupingId = shift @{ $groupingIds } ) {
GROUPINGID: while ( my $groupingId = shift @{ $groupingIds } ) {
my $group = WebGUI::Group->new( $self->session, $groupingId );
next GROUPINGID unless $group;
for my $groupGroupingId ( @{ $group->getGroupsFor } ) {
if ( !$groupIds{ $groupGroupingId } ) {
push @{ $groupingIds }, $groupGroupingId;