mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +02:00
MDL-38102 lib: Check for null return value from password_hash function call
This commit is contained in:
parent
f29e62cb6c
commit
d7f69362b9
1 changed files with 1 additions and 1 deletions
|
@ -4483,7 +4483,7 @@ function hash_internal_user_password($password, $fasthash = false) {
|
|||
|
||||
$generatedhash = password_hash($password, PASSWORD_DEFAULT, $options);
|
||||
|
||||
if ($generatedhash === false) {
|
||||
if ($generatedhash === false || $generatedhash === null) {
|
||||
throw new moodle_exception('Failed to generate password hash.');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue