mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-07-11 11:36:24 +02:00
Do not pass 'null' to 'count' which triggers a warning since PHP 7.2
This commit is contained in:
@ -510,7 +510,7 @@ final class Administration extends UserManager {
|
|||||||
throw new DatabaseError();
|
throw new DatabaseError();
|
||||||
}
|
}
|
||||||
|
|
||||||
$numberOfMatchingUsers = \count($users);
|
$numberOfMatchingUsers = ($users !== null) ? \count($users) : 0;
|
||||||
|
|
||||||
if ($numberOfMatchingUsers === 1) {
|
if ($numberOfMatchingUsers === 1) {
|
||||||
$user = $users[0];
|
$user = $users[0];
|
||||||
|
Reference in New Issue
Block a user