1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-30 09:20:58 +01:00

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
This commit is contained in:
epriestley 2016-01-07 03:26:33 -08:00
parent 96b1665eaa
commit e84693f589

View file

@ -54,7 +54,7 @@ final class PhabricatorSearchHovercardController
$cards = array(); $cards = array();
foreach ($phids as $phid) { foreach ($phids as $phid) {
$handle = $handles[$phid]; $handle = $handles[$phid];
$object = $objects[$phid]; $object = idx($objects, $phid);
$hovercard = id(new PhabricatorHovercardView()) $hovercard = id(new PhabricatorHovercardView())
->setUser($viewer) ->setUser($viewer)