diff --git a/src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php b/src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php index 8d76cadcec..1fdc7b9016 100644 --- a/src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php +++ b/src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php @@ -55,13 +55,18 @@ final class PhabricatorDashboardSearchEngine $dashboards = mpull($dashboards, null, 'getPHID'); $viewer = $this->requireViewer(); - $installs = id(new PhabricatorDashboardInstall()) - ->loadAllWhere( - 'objectPHID IN (%Ls) AND dashboardPHID IN (%Ls)', - array(PhabricatorHomeApplication::DASHBOARD_DEFAULT, - $viewer->getPHID()), - array_keys($dashboards)); - $installs = mpull($installs, null, 'getDashboardPHID'); + + if ($dashboards) { + $installs = id(new PhabricatorDashboardInstall()) + ->loadAllWhere( + 'objectPHID IN (%Ls) AND dashboardPHID IN (%Ls)', + array(PhabricatorHomeApplication::DASHBOARD_DEFAULT, + $viewer->getPHID()), + array_keys($dashboards)); + $installs = mpull($installs, null, 'getDashboardPHID'); + } else { + $installs = array(); + } $list = new PHUIObjectItemListView(); $list->setUser($viewer);