1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Fix a fatal in Calendar widget in Conpherence

Summary:
Fixes T8548. This needs to be cleaned up more generally at some point, but stop the bleeding for now.

If a thread member is invited to an event with a non-thread-member host, we try to render the host but don't have their handle (this is a holdover from the bygone days of events as statuses).

For now, just don't render anything. In the future, it might be nice to render (some of?) the attendees who are thread members, but I suspect we may revisit this widget more generally.

Test Plan:
  - As a non thread-member, created an event and invited a thread member.
  - Viewed thread as thread-member.
  - Saw widget fatal.
  - Applied patch.
  - As thread-member, saw widget render with just "9AM-10AM", instead of "host, 9AM-10AM".

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8548

Differential Revision: https://secure.phabricator.com/D13299
This commit is contained in:
epriestley 2015-06-15 13:51:36 -07:00
parent 6aa494bd25
commit 9f1235d875

View file

@ -310,8 +310,14 @@ final class ConpherenceWidgetController extends ConpherenceController {
$user,
$time_str);
$secondary_info = pht('%s, %s',
$handles[$status->getUserPHID()]->getName(), $epoch_range);
if (isset($handles[$status->getUserPHID()])) {
$secondary_info = pht(
'%s, %s',
$handles[$status->getUserPHID()]->getName(),
$epoch_range);
} else {
$secondary_info = $epoch_range;
}
$content[] = phutil_tag(
'div',