]> source.dussan.org Git - nextcloud-server.git/commitdiff
LDAP: avoid PHP Warnings cause by passing empty values to implode
authorArthur Schiwon <blizzz@owncloud.com>
Mon, 22 Jul 2013 11:57:58 +0000 (13:57 +0200)
committerArthur Schiwon <blizzz@owncloud.com>
Mon, 22 Jul 2013 11:57:58 +0000 (13:57 +0200)
apps/user_ldap/lib/connection.php

index c51a01118cdffbf708789696d6bf5734f54aed50..2011ba3878ddf78c9349c174888ea6f6e28baf01 100644 (file)
@@ -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];