From 08da66300700e25b2f0a1a0f37bc12c25c352dbe Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 16 Dec 2021 20:22:57 +0200 Subject: [PATCH] fix PHP Warning: explode(): Empty delimiter --- 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 666f363958..0c2166d4da 100644 --- a/api/src/Contacts/Ldap.php +++ b/api/src/Contacts/Ldap.php @@ -1476,7 +1476,7 @@ class Ldap function _inetorgperson2egw(&$contact, $data, $cn='cn') { $matches = null; - if(empty($data['givenname'][0])) + if (empty($data['givenname'][0]) && !empty($data['sn'][0])) { $parts = explode($data['sn'][0], $data[$cn][0]); $contact['n_prefix'] = trim($parts[0]);