@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Clean up a couple more URI alter() calls

Summary:
See <https://discourse.phabricator-community.org/t/create-new-phriction-document-fails-with-unhandled-exception-invalidargumentexception/2406>.

These weren't obviously nullable from a cursory `grep`, but are sometimes nullable in practice.

Test Plan: Created, then saved a new Phriction document.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D20184

+23 -5
+8 -3
src/applications/phriction/editor/PhrictionTransactionEditor.php
··· 229 229 foreach ($xactions as $xaction) { 230 230 switch ($xaction->getTransactionType()) { 231 231 case PhrictionDocumentContentTransaction::TRANSACTIONTYPE: 232 - $uri = id(new PhutilURI('/phriction/diff/'.$object->getID().'/')) 233 - ->alter('l', $this->getOldContent()->getVersion()) 234 - ->alter('r', $this->getNewContent()->getVersion()); 232 + $params = array( 233 + 'l' => $this->getOldContent()->getVersion(), 234 + 'r' => $this->getNewContent()->getVersion(), 235 + ); 236 + 237 + $path = '/phriction/diff/'.$object->getID().'/'; 238 + $uri = new PhutilURI($path, $params); 239 + 235 240 $this->contentDiffURI = (string)$uri; 236 241 break 2; 237 242 default:
+15 -2
src/view/phui/PHUITimelineView.php
··· 154 154 } 155 155 156 156 $uri = $this->getPager()->getNextPageURI(); 157 - $uri->replaceQueryParam('quoteTargetID', $this->getQuoteTargetID()); 158 - $uri->replaceQueryParam('quoteRef', $this->getQuoteRef()); 157 + 158 + $target_id = $this->getQuoteTargetID(); 159 + if ($target_id === null) { 160 + $uri->removeQueryParam('quoteTargetID'); 161 + } else { 162 + $uri->replaceQueryParam('quoteTargetID', $target_id); 163 + } 164 + 165 + $quote_ref = $this->getQuoteRef(); 166 + if ($quote_ref === null) { 167 + $uri->removeQueryParam('quoteRef'); 168 + } else { 169 + $uri->replaceQueryParam('quoteRef', $quote_ref); 170 + } 171 + 159 172 $events[] = javelin_tag( 160 173 'div', 161 174 array(