From 09ed95583c815b1e892df62d95123f6241f2cdf1 Mon Sep 17 00:00:00 2001 From: Bob Trahan Date: Sun, 28 Apr 2013 11:00:43 -0700 Subject: [PATCH] Conpherence - fix a bug Summary: gotta idx() on this as the user may have no conpherences at all. Test Plan: loaded up my 'noconpherences' user and observed no errors in the error log. my normal test user still worked okay too. Reviewers: epriestley, garoevans Reviewed By: garoevans CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5791 --- src/view/page/menu/PhabricatorMainMenuView.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/page/menu/PhabricatorMainMenuView.php b/src/view/page/menu/PhabricatorMainMenuView.php index 46babab524..6834f3b6e5 100644 --- a/src/view/page/menu/PhabricatorMainMenuView.php +++ b/src/view/page/menu/PhabricatorMainMenuView.php @@ -271,7 +271,7 @@ final class PhabricatorMainMenuView extends AphrontView { ->withParticipantPHIDs(array($user->getPHID())) ->withParticipationStatus($unread_status) ->execute(); - $message_count_number = $unread[$user->getPHID()]; + $message_count_number = idx($unread, $user->getPHID(), 0); if ($message_count_number > 999) { $message_count_number = "\xE2\x88\x9E"; }