From 5be9f70efcb3d5163708192482b89697a7818d5b Mon Sep 17 00:00:00 2001 From: Frank Dillon Date: Thu, 13 Jul 2006 00:57:04 +0000 Subject: [PATCH] fixed issue where upgrade will fail if there are any ldap groups with no users in them. --- docs/upgrades/upgrade_6.99.4-6.99.5.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/upgrades/upgrade_6.99.4-6.99.5.pl b/docs/upgrades/upgrade_6.99.4-6.99.5.pl index d9045c6e2..9eddfc2de 100644 --- a/docs/upgrades/upgrade_6.99.4-6.99.5.pl +++ b/docs/upgrades/upgrade_6.99.4-6.99.5.pl @@ -54,7 +54,7 @@ sub fixGroups { foreach my $linkId (keys %{$ldapLinks}) { my $ldapLink = $ldapLinks->{$linkId}; my $people = $ldapLink->getProperty($hash->{ldapGroup},$hash->{ldapGroupProperty}); - if(scalar(@{$people})) { + if($people && scalar(@{$people})) { $session->db->write("update groups set ldapLinkId=? where groupId=?",[$linkId,$hash->{groupId}]); } }