From 027de23970c071715d3e05544e6e59636c32a45d Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 4 Feb 2017 07:08:49 -0800 Subject: [PATCH] Fix a policy error for restricted applications in a profile menu Ref T12174. This could improperly raise a policy error. Instead, hide the menu item. Auditors: chad --- .../menuitem/PhabricatorApplicationProfileMenuItem.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/applications/search/menuitem/PhabricatorApplicationProfileMenuItem.php b/src/applications/search/menuitem/PhabricatorApplicationProfileMenuItem.php index 92477522ba..aa42d56cfb 100644 --- a/src/applications/search/menuitem/PhabricatorApplicationProfileMenuItem.php +++ b/src/applications/search/menuitem/PhabricatorApplicationProfileMenuItem.php @@ -60,12 +60,12 @@ final class PhabricatorApplicationProfileMenuItem $viewer = $this->getViewer(); $phid = $config->getMenuItemProperty('application'); - $app = id(new PhabricatorApplicationQuery()) + $apps = id(new PhabricatorApplicationQuery()) ->setViewer($viewer) ->withPHIDs(array($phid)) - ->executeOne(); + ->execute(); - return $app; + return head($apps); } protected function newNavigationMenuItems(