1
0
mirror of https://github.com/delight-im/PHP-Auth.git synced 2025-07-11 03:26:20 +02:00

Do not pass 'null' to 'count' which triggers a warning since PHP 7.2

This commit is contained in:
Marco
2018-03-15 23:32:15 +01:00
parent e7e174b05d
commit 58e69fdd0e

View File

@ -510,7 +510,7 @@ final class Administration extends UserManager {
throw new DatabaseError();
}
$numberOfMatchingUsers = \count($users);
$numberOfMatchingUsers = ($users !== null) ? \count($users) : 0;
if ($numberOfMatchingUsers === 1) {
$user = $users[0];