From: Arthur Schiwon Date: Tue, 10 Sep 2013 15:39:29 +0000 (+0200) Subject: LDAP: get rid of some PHP Warnings X-Git-Tag: v6.0.0alpha2~103^2~6 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bb162b1f94c3966457e8b08191cd85620478c940;p=nextcloud-server.git LDAP: get rid of some PHP Warnings --- diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php index 0bf13a19377..053ec7e2355 100644 --- a/apps/user_ldap/lib/connection.php +++ b/apps/user_ldap/lib/connection.php @@ -396,7 +396,7 @@ class Connection extends LDAPUtility { public function saveConfiguration() { $trans = array_flip($this->getConfigTranslationArray()); foreach($this->config as $key => $value) { - \OCP\Util::writeLog('user_ldap', 'LDAP: storing key '.$key.' value '.$value, \OCP\Util::DEBUG); + \OCP\Util::writeLog('user_ldap', 'LDAP: storing key '.$key.' value '.print_r($value, true), \OCP\Util::DEBUG); switch ($key) { case 'ldapAgentPassword': $value = base64_encode($value); @@ -441,6 +441,11 @@ class Connection extends LDAPUtility { $config[$dbKey] = ''; } continue; + } else if((strpos($classKey, 'ldapBase') !== false + || strpos($classKey, 'ldapAttributes') !== false) + && is_array($this->config[$classKey])) { + $config[$dbKey] = implode("\n", $this->config[$classKey]); + continue; } $config[$dbKey] = $this->config[$classKey]; }