From 281082f4d73007de4190534fd8389f9fab14851f Mon Sep 17 00:00:00 2001 From: Bob Trahan <btrahan@phacility.com> Date: Tue, 16 Jun 2015 14:38:29 -0700 Subject: [PATCH] Conpherence - fix a bug where users have no events Summary: Fixes T8518. Defaulting $events to null creates carnage further down the stack. Instead, default it to array() so foreach, array_select_keys, etc. don't barf. Test Plan: logic and will ask the reporting user to verify since they can repro 100% Reviewers: epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Maniphest Tasks: T8518 Differential Revision: https://secure.phabricator.com/D13314 --- src/applications/conpherence/query/ConpherenceThreadQuery.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/applications/conpherence/query/ConpherenceThreadQuery.php b/src/applications/conpherence/query/ConpherenceThreadQuery.php index 1b311516f8..a04037cf6c 100644 --- a/src/applications/conpherence/query/ConpherenceThreadQuery.php +++ b/src/applications/conpherence/query/ConpherenceThreadQuery.php @@ -355,6 +355,7 @@ final class ConpherenceThreadQuery $start_epoch = $epochs['start_epoch']; $end_epoch = $epochs['end_epoch']; + $events = array(); if ($participant_phids) { $events = id(new PhabricatorCalendarEventQuery()) ->setViewer($this->getViewer()) @@ -363,8 +364,6 @@ final class ConpherenceThreadQuery ->withDateRange($start_epoch, $end_epoch) ->execute(); $events = mpull($events, null, 'getPHID'); - } else { - $events = null; } $invitees = array();