LDAP: get rid of some PHP Warnings

This commit is contained in:
Arthur Schiwon 2013-09-10 17:39:29 +02:00
parent d4f92494a2
commit bb162b1f94
1 changed files with 6 additions and 1 deletions

View File

@ -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];
}