From 66060b294bce163037afa2e9352be9336c28cee6 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 15 Feb 2019 04:53:42 -0800 Subject: [PATCH] Fix a URI construction in remarkup macro/meme rules Summary: Ref T13250. Some of these parameters may be NULL, and `alter()` is no longer happy about that. Test Plan: Ran daemon tasks that happened to render some memes. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13250 Differential Revision: https://secure.phabricator.com/D20176 --- .../macro/engine/PhabricatorMemeEngine.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/applications/macro/engine/PhabricatorMemeEngine.php b/src/applications/macro/engine/PhabricatorMemeEngine.php index 7433a4e8bc..afee0f9b18 100644 --- a/src/applications/macro/engine/PhabricatorMemeEngine.php +++ b/src/applications/macro/engine/PhabricatorMemeEngine.php @@ -47,10 +47,13 @@ final class PhabricatorMemeEngine extends Phobject { } public function getGenerateURI() { - return id(new PhutilURI('/macro/meme/')) - ->alter('macro', $this->getTemplate()) - ->alter('above', $this->getAboveText()) - ->alter('below', $this->getBelowText()); + $params = array( + 'macro' => $this->getTemplate(), + 'above' => $this->getAboveText(), + 'below' => $this->getBelowText(), + ); + + return new PhutilURI('/macro/meme/', $params); } public function newAsset() {