From 66161feb13c47fa93f5e9d812a66c676e497177c Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 25 Feb 2019 04:50:37 -0800 Subject: [PATCH] Fix a URI construction exception when filtering the Maniphest Burnup chart by project Summary: See . Test Plan: Viewed Maniphest burnup chart, filtered by project: no more URI construction exception. Reviewers: amckinley Reviewed By: amckinley Differential Revision: https://secure.phabricator.com/D20207 --- .../controller/ManiphestReportController.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/applications/maniphest/controller/ManiphestReportController.php b/src/applications/maniphest/controller/ManiphestReportController.php index 77bd6c0d59..40498e6e40 100644 --- a/src/applications/maniphest/controller/ManiphestReportController.php +++ b/src/applications/maniphest/controller/ManiphestReportController.php @@ -13,10 +13,19 @@ final class ManiphestReportController extends ManiphestController { $project = head($request->getArr('set_project')); $project = nonempty($project, null); - $uri = $uri->alter('project', $project); + + if ($project !== null) { + $uri->replaceQueryParam('project', $project); + } else { + $uri->removeQueryParam('project'); + } $window = $request->getStr('set_window'); - $uri = $uri->alter('window', $window); + if ($window !== null) { + $uri->replaceQueryParam('window', $window); + } else { + $uri->removeQueryParam('window'); + } return id(new AphrontRedirectResponse())->setURI($uri); }