From e84693f589d31090d163696fa50e47c8d39871aa Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 7 Jan 2016 03:26:33 -0800 Subject: [PATCH] Fix a bad lookup in hovercards Summary: If you try to pull the hovercard of something you can no longer see (maybe you loaded the page, then the policy changed) there won't be a value in the array here. (The rest of the code anticipates this possibility.) Test Plan: Hovered some stuff. Reviewers: chad Reviewed By: chad Differential Revision: https://secure.phabricator.com/D14987 --- .../search/controller/PhabricatorSearchHovercardController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/search/controller/PhabricatorSearchHovercardController.php b/src/applications/search/controller/PhabricatorSearchHovercardController.php index 3993753cc2..3f1e197996 100644 --- a/src/applications/search/controller/PhabricatorSearchHovercardController.php +++ b/src/applications/search/controller/PhabricatorSearchHovercardController.php @@ -54,7 +54,7 @@ final class PhabricatorSearchHovercardController $cards = array(); foreach ($phids as $phid) { $handle = $handles[$phid]; - $object = $objects[$phid]; + $object = idx($objects, $phid); $hovercard = id(new PhabricatorHovercardView()) ->setUser($viewer)