From 5477f3d095788c3bb77978f0822443dae713866c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 9 Nov 2021 11:04:29 +0100 Subject: [PATCH] * LDAP/Addressbook: fix region contains for given country invalid value gives an LDAP error on update cause by trying to write NULL, which is not allowed, unsetting the attribute the proper way now --- api/src/Contacts/Ldap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Contacts/Ldap.php b/api/src/Contacts/Ldap.php index de8d925e2e..aee3b47c6c 100644 --- a/api/src/Contacts/Ldap.php +++ b/api/src/Contacts/Ldap.php @@ -596,7 +596,7 @@ class Ldap $ldapContact[$ldapFieldName] = $ldapFieldName == 'jpegphoto' ? $data[$egwFieldName] : Api\Translation::convert($data[$egwFieldName], $this->charset,'utf-8'); } - elseif($isUpdate && isset($data[$egwFieldName])) + elseif($isUpdate && array_key_exists($egwFieldName, $data)) { $ldapContact[$ldapFieldName] = array(); }