Eliminated a warning due to attempting to index into null
This commit is contained in:
parent
362ee182cb
commit
deb47f94d3
@ -27,11 +27,11 @@ class User extends Entity {
|
||||
throw new Exception('Invalid type');
|
||||
}
|
||||
execute($find);
|
||||
$id = result_single($find)['id'];
|
||||
if($id === null) {
|
||||
$result = result_single($find);
|
||||
if(!$result) {
|
||||
throw new Exception("Invalid username '$clue'");
|
||||
}
|
||||
$this->id = $id;
|
||||
$this->id = $result['id'];
|
||||
$this->update_fields();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user