Skip to content
Snippets Groups Projects
Commit a3ec4e83 authored by Tim van Dijen's avatar Tim van Dijen Committed by Thijs Kinkhorst
Browse files

Fix build after merging #1418

(cherry picked from commit eff82881)
parent 82a3349d
No related branches found
Tags
No related merge requests found
......@@ -436,7 +436,9 @@ class Crypto
throw new \InvalidArgumentException('Invalid input parameters.');
}
if (!is_null(password_get_info($password)['algo'])) {
// Prior to PHP 7.4 password_get_info() would set the algo to 0 instead of NULL when it's not detected
$info = password_get_info($password);
if ($info['algo'] !== null && $info['algo'] !== 0) {
throw new Error\Exception("Cannot use a hash value for authentication.");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment