mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-29 18:22:41 +01:00
Fix a small bug with empty user queries
Summary: This does the wrong thing (fatals) if there are no passed PHIDs. Test Plan: No more fatal. Reviewers: btrahan Reviewed By: btrahan CC: aran Differential Revision: https://secure.phabricator.com/D5940
This commit is contained in:
parent
c967141f92
commit
27a0265367
1 changed files with 5 additions and 0 deletions
|
@ -47,9 +47,14 @@ final class PhabricatorUserStatus extends PhabricatorUserDAO {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function loadCurrentStatuses($user_phids) {
|
public function loadCurrentStatuses($user_phids) {
|
||||||
|
if (!$user_phids) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
$statuses = $this->loadAllWhere(
|
$statuses = $this->loadAllWhere(
|
||||||
'userPHID IN (%Ls) AND UNIX_TIMESTAMP() BETWEEN dateFrom AND dateTo',
|
'userPHID IN (%Ls) AND UNIX_TIMESTAMP() BETWEEN dateFrom AND dateTo',
|
||||||
$user_phids);
|
$user_phids);
|
||||||
|
|
||||||
return mpull($statuses, null, 'getUserPHID');
|
return mpull($statuses, null, 'getUserPHID');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue