mirror of
https://github.com/friendica/friendica
synced 2025-04-27 01:10:14 +00:00
Merge pull request #9552 from annando/zero-user
Avoid problems with uid=0
This commit is contained in:
commit
10a4802d81
4 changed files with 4 additions and 4 deletions
|
@ -264,7 +264,7 @@ class User
|
|||
*/
|
||||
public static function getById($uid, array $fields = [])
|
||||
{
|
||||
return DBA::selectFirst('user', $fields, ['uid' => $uid]);
|
||||
return !empty($uid) ? DBA::selectFirst('user', $fields, ['uid' => $uid]) : [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue