A free open source IT asset/license management system
Temp fix for blank LDAP values when LDAP is disabled
snipe8313a069bf37
diff --git a/app/Models/LdapAdConfiguration.php b/app/Models/LdapAdConfiguration.phpindex 22cee10da3..6539ab666a 100644--- a/app/Models/LdapAdConfiguration.php+++ b/app/Models/LdapAdConfiguration.php@@ -81,7 +81,7 @@ class LdapAdConfigurationreturn boolval($item);}// Decrypt the admin password- if ('ldap_pword' === $key) {+ if (('ldap_pword' === $key) && ($item!='')) {try {return decrypt($item);} catch (Exception $e) {@@ -236,10 +236,13 @@ class LdapAdConfiguration})->toArray();}- $parts = explode('//', $this->ldapSettings['ldap_server']);+ if ($this->ldapSettings['ldap_server']) {+ $parts = explode('//', $this->ldapSettings['ldap_server']);+ return [+ $parts[1],+ ];+ }- return [- $parts[1],- ];+ return [];}}