mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-14 19:18:41 +00:00
Handle invalid type asignment
This commit is contained in:
parent
5639b7936d
commit
d494da3d3b
|
|
@ -561,11 +561,13 @@ class Account implements ArrayableInterface, \JsonSerializable
|
|||
*/
|
||||
public function generatePassword(string $password) : void
|
||||
{
|
||||
$this->password = \password_hash($password, \PASSWORD_DEFAULT);
|
||||
$temp = \password_hash($password, \PASSWORD_DEFAULT);
|
||||
|
||||
if ($this->password === false) {
|
||||
if ($temp === false) {
|
||||
throw new \Exception();
|
||||
}
|
||||
|
||||
$this->password = $temp;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user