From: Arthur Schiwon Date: Mon, 22 Jul 2013 11:57:58 +0000 (+0200) Subject: LDAP: avoid PHP Warnings cause by passing empty values to implode X-Git-Tag: v5.0.10~12^2~8 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4b203280d20241d987b43a6225f445c7685fb728;p=nextcloud-server.git LDAP: avoid PHP Warnings cause by passing empty values to implode --- diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php index c51a01118cd..2011ba3878d 100644 --- a/apps/user_ldap/lib/connection.php +++ b/apps/user_ldap/lib/connection.php @@ -416,7 +416,11 @@ class Connection { continue; } else if((strpos($classKey, 'ldapBase') !== false) || (strpos($classKey, 'ldapAttributes') !== false)) { - $config[$dbKey] = implode("\n", $this->config[$classKey]); + if(!empty($this->config[$classKey])) { + $config[$dbKey] = implode("\n", $this->config[$classKey]); + } else { + $config[$dbKey] = ''; + } continue; } $config[$dbKey] = $this->config[$classKey];