FIX: installation superadmin creation: PHP 8 warning
This commit is contained in:
parent
16257a0e74
commit
49d79a4c7c
@ -257,7 +257,7 @@ function dol_verifyHash($chain, $hash, $type = '0')
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
if ($type == '0' && !empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'password_hash' && function_exists('password_verify')) {
|
if ($type == '0' && !empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'password_hash' && function_exists('password_verify')) {
|
||||||
if ($hash[0] == '$') {
|
if (! empty($hash[0]) && $hash[0] == '$') {
|
||||||
return password_verify($chain, $hash);
|
return password_verify($chain, $hash);
|
||||||
} elseif (strlen($hash) == 32) {
|
} elseif (strlen($hash) == 32) {
|
||||||
return dol_verifyHash($chain, $hash, '3'); // md5
|
return dol_verifyHash($chain, $hash, '3'); // md5
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user