Set elvis operator to ensure ldap version is 3 if null

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2022-06-06 20:57:18 -07:00
parent 7faaa4ce24
commit 8337628323

View file

@ -37,7 +37,7 @@ class Ldap extends Model
public static function connectToLdap()
{
$ldap_host = Setting::getSettings()->ldap_server;
$ldap_version = Setting::getSettings()->ldap_version;
$ldap_version = Setting::getSettings()->ldap_version ?: 3;
$ldap_server_cert_ignore = Setting::getSettings()->ldap_server_cert_ignore;
$ldap_use_tls = Setting::getSettings()->ldap_tls;