mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 19:40:55 +01:00
Fix a possible query error in filtering events
If all events are filtered by range logic, this invitee query may be invalid. Auditors: lpriestley
This commit is contained in:
parent
59f0e8f950
commit
cb52dd27fc
1 changed files with 9 additions and 5 deletions
|
@ -266,11 +266,15 @@ final class PhabricatorCalendarEventQuery
|
|||
$phids[] = $event->getPHID();
|
||||
}
|
||||
|
||||
$invitees = id(new PhabricatorCalendarEventInviteeQuery())
|
||||
->setViewer($this->getViewer())
|
||||
->withEventPHIDs($phids)
|
||||
->execute();
|
||||
$invitees = mgroup($invitees, 'getEventPHID');
|
||||
if ($events) {
|
||||
$invitees = id(new PhabricatorCalendarEventInviteeQuery())
|
||||
->setViewer($this->getViewer())
|
||||
->withEventPHIDs($phids)
|
||||
->execute();
|
||||
$invitees = mgroup($invitees, 'getEventPHID');
|
||||
} else {
|
||||
$invitees = array();
|
||||
}
|
||||
|
||||
foreach ($events as $event) {
|
||||
$event_invitees = idx($invitees, $event->getPHID(), array());
|
||||
|
|
Loading…
Reference in a new issue