LDAP: get rid of some PHP Warnings
This commit is contained in:
parent
d4f92494a2
commit
bb162b1f94
|
@ -396,7 +396,7 @@ class Connection extends LDAPUtility {
|
||||||
public function saveConfiguration() {
|
public function saveConfiguration() {
|
||||||
$trans = array_flip($this->getConfigTranslationArray());
|
$trans = array_flip($this->getConfigTranslationArray());
|
||||||
foreach($this->config as $key => $value) {
|
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) {
|
switch ($key) {
|
||||||
case 'ldapAgentPassword':
|
case 'ldapAgentPassword':
|
||||||
$value = base64_encode($value);
|
$value = base64_encode($value);
|
||||||
|
@ -441,6 +441,11 @@ class Connection extends LDAPUtility {
|
||||||
$config[$dbKey] = '';
|
$config[$dbKey] = '';
|
||||||
}
|
}
|
||||||
continue;
|
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];
|
$config[$dbKey] = $this->config[$classKey];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue