forked from Wavyzz/dolibarr
FIX avoid php8 warnings
This commit is contained in:
@@ -269,9 +269,9 @@ if ($num2) {
|
|||||||
// Value
|
// Value
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if (is_array($key['param'])) {
|
if (is_array($key['param'])) {
|
||||||
print $form->selectarray($label, $key['param'], $conf->global->$label, 0);
|
print $form->selectarray($label, $key['param'], getDolGlobalString($label), 0);
|
||||||
} else {
|
} else {
|
||||||
print '<input type="text" size="20" id="'.$label.'" name="'.$key['label'].'" value="'.$conf->global->$label.'">';
|
print '<input type="text" size="20" id="'.$label.'" name="'.$key['label'].'" value="'.getDolGlobalString($label).'">';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
@@ -267,9 +267,9 @@ function dol_verifyHash($chain, $hash, $type = '0')
|
|||||||
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 (! empty($hash[0]) && $hash[0] == '$') {
|
if (! empty($hash[0]) && $hash[0] == '$') {
|
||||||
return password_verify($chain, $hash);
|
return password_verify($chain, $hash);
|
||||||
} elseif (strlen($hash) == 32) {
|
} elseif (dol_strlen($hash) == 32) {
|
||||||
return dol_verifyHash($chain, $hash, '3'); // md5
|
return dol_verifyHash($chain, $hash, '3'); // md5
|
||||||
} elseif (strlen($hash) == 40) {
|
} elseif (dol_strlen($hash) == 40) {
|
||||||
return dol_verifyHash($chain, $hash, '2'); // sha1md5
|
return dol_verifyHash($chain, $hash, '2'); // sha1md5
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user