Merge pull request #24341 from hregis/fix_avoid_php8_warning

FIX avoid php8 warnings
This commit is contained in:
Laurent Destailleur 2023-03-26 14:45:08 +02:00 committed by GitHub
commit b948c9feb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -269,9 +269,9 @@ if ($num2) {
// Value
print '<td>';
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 {
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>';

View File

@ -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 (! empty($hash[0]) && $hash[0] == '$') {
return password_verify($chain, $hash);
} elseif (strlen($hash) == 32) {
} elseif (dol_strlen($hash) == 32) {
return dol_verifyHash($chain, $hash, '3'); // md5
} elseif (strlen($hash) == 40) {
} elseif (dol_strlen($hash) == 40) {
return dol_verifyHash($chain, $hash, '2'); // sha1md5
}