1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-27 07:50:57 +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:
epriestley 2013-05-17 03:55:45 -07:00
parent c967141f92
commit 27a0265367

View file

@ -47,9 +47,14 @@ final class PhabricatorUserStatus extends PhabricatorUserDAO {
}
public function loadCurrentStatuses($user_phids) {
if (!$user_phids) {
return array();
}
$statuses = $this->loadAllWhere(
'userPHID IN (%Ls) AND UNIX_TIMESTAMP() BETWEEN dateFrom AND dateTo',
$user_phids);
return mpull($statuses, null, 'getUserPHID');
}