From bc951cd78c848253cbe0797ac808ae95bf4c46a2 Mon Sep 17 00:00:00 2001 From: janw Date: Mon, 10 Nov 2008 14:15:17 +0000 Subject: [PATCH] Added more checks to array search. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@12985 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/server/events/gosaTriggered.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gosa-si/server/events/gosaTriggered.pm b/gosa-si/server/events/gosaTriggered.pm index 659557c08..abd944807 100644 --- a/gosa-si/server/events/gosaTriggered.pm +++ b/gosa-si/server/events/gosaTriggered.pm @@ -968,7 +968,11 @@ sub trigger_activate_new { } # Add to ObjectGroup - if(!(scalar grep $_ eq $ldap_entry->dn, @{$ogroup_entry->get_value('member', asref => 1)})) { + my $ogroup_member = $ogroup_entry->get_value('member', asref => 1); + if( (!defined($ogroup_member)) || + (!defined($ldap_entry)) || + (!defined($ldap_entry->dn)) || + (!(scalar grep $_ eq $ldap_entry->dn, @{$ogroup_member}))) { $ogroup_entry->add ( 'member' => $ldap_entry->dn(), ); -- 2.30.2