Skip to content
Snippets Groups Projects
Commit eff82881 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Fix build after merging #1418

parent 59feedca
No related branches found
No related tags found
No related merge requests found
...@@ -429,7 +429,9 @@ class Crypto ...@@ -429,7 +429,9 @@ class Crypto
throw new \InvalidArgumentException('Invalid input parameters.'); 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."); 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.
Finish editing this message first!
Please register or to comment