diff --git a/src/applications/dashboard/controller/dashboard/PhabricatorDashboardAdjustController.php b/src/applications/dashboard/controller/dashboard/PhabricatorDashboardAdjustController.php index fc04b94603..4f3937e3ae 100644 --- a/src/applications/dashboard/controller/dashboard/PhabricatorDashboardAdjustController.php +++ b/src/applications/dashboard/controller/dashboard/PhabricatorDashboardAdjustController.php @@ -32,7 +32,7 @@ final class PhabricatorDashboardAdjustController $panel_ref = null; $panel_key = $request->getStr('panelKey'); - if (strlen($panel_key)) { + if ($panel_key !== null && strlen($panel_key)) { $panel_ref = $ref_list->getPanelRef($panel_key); if (!$panel_ref) { return new Aphront404Response(); diff --git a/src/applications/dashboard/controller/panel/PhabricatorDashboardPanelTabsController.php b/src/applications/dashboard/controller/panel/PhabricatorDashboardPanelTabsController.php index 193e4580d6..7ea0345ceb 100644 --- a/src/applications/dashboard/controller/panel/PhabricatorDashboardPanelTabsController.php +++ b/src/applications/dashboard/controller/panel/PhabricatorDashboardPanelTabsController.php @@ -41,12 +41,12 @@ final class PhabricatorDashboardPanelTabsController $op = $request->getURIData('op'); $after = $request->getStr('after'); - if (!strlen($after)) { + if ($after === '') { $after = null; } $target = $request->getStr('target'); - if (!strlen($target)) { + if ($target === '') { $target = null; } diff --git a/src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php b/src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php index cce6ee768f..3b9c3ad192 100644 --- a/src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php +++ b/src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php @@ -155,6 +155,7 @@ final class PhabricatorDashboardPanelRenderingEngine extends Phobject { return $this->renderNormalPanel(); } catch (Exception $ex) { + phlog($ex); return $this->renderErrorPanel( $panel->getName(), pht( diff --git a/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php b/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php index 9bc84d820e..3cf73b539e 100644 --- a/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php +++ b/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php @@ -100,7 +100,7 @@ final class PhabricatorDashboardTabsPanelType $panel_id = idx($tab_spec, 'panelID'); $subpanel = idx($panels, $panel_id); - $name = idx($tab_spec, 'name'); + $name = coalesce(idx($tab_spec, 'name'), ''); if (!strlen($name)) { if ($subpanel) { $name = $subpanel->getName(); diff --git a/src/applications/search/engineextension/PhabricatorFerretSearchEngineExtension.php b/src/applications/search/engineextension/PhabricatorFerretSearchEngineExtension.php index 55b7c2225a..2544f8b7da 100644 --- a/src/applications/search/engineextension/PhabricatorFerretSearchEngineExtension.php +++ b/src/applications/search/engineextension/PhabricatorFerretSearchEngineExtension.php @@ -27,7 +27,7 @@ final class PhabricatorFerretSearchEngineExtension PhabricatorSavedQuery $saved, array $map) { - if (!strlen($map['query'])) { + if (!(isset($map['query']) && strlen($map['query']))) { return; }