From bb162b1f94c3966457e8b08191cd85620478c940 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Tue, 10 Sep 2013 17:39:29 +0200 Subject: [PATCH] LDAP: get rid of some PHP Warnings --- apps/user_ldap/lib/connection.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php index 0bf13a1937..053ec7e235 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]; }