From 49d79a4c7c737e0d05163a4ee6b5f6bddfb74d80 Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio <68746600+marc-dll@users.noreply.github.com> Date: Wed, 8 Mar 2023 10:48:38 +0100 Subject: [PATCH] FIX: installation superadmin creation: PHP 8 warning --- htdocs/core/lib/security.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index d1d0d7ed7d0..5a610090be2 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -257,7 +257,7 @@ function dol_verifyHash($chain, $hash, $type = '0') 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 ($hash[0] == '$') { + if (! empty($hash[0]) && $hash[0] == '$') { return password_verify($chain, $hash); } elseif (strlen($hash) == 32) { return dol_verifyHash($chain, $hash, '3'); // md5