1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-30 02:32:42 +01:00

Fix a URI construction exception when filtering the Maniphest Burnup chart by project

Summary: See <https://discourse.phabricator-community.org/t/filtering-burnup-rate-by-project-produces-exception/2442>.

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
This commit is contained in:
epriestley 2019-02-25 04:50:37 -08:00
parent 01d0fc443a
commit 66161feb13

View file

@ -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);
}