Update plugin.php

null check fix
This commit is contained in:
K3A 2018-02-01 20:51:27 +01:00 committed by GitHub
parent 692cffa9af
commit f562a093f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -280,7 +280,7 @@ function ldapauth_merge_users() {
if ( !ldapauth_environment_check() ) {
die( 'Invalid configuration for YOURLS LDAP plugin. Check PHP error log.' );
}
if(LDAPAUTH_USERCACHE_TYPE==1 && isset(yourls_get_option('ldapauth_usercache'))) {
if(LDAPAUTH_USERCACHE_TYPE==1 && null !== yourls_get_option('ldapauth_usercache')) {
ldapauth_debug("Merging text file users and cached LDAP users");
$yourls_user_passwords = array_merge($yourls_user_passwords, yourls_get_option('ldapauth_usercache'));
}