@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.

Fix some "URI->alter(X, null)" callsites

Summary:
Ref T13250. This internally calls `replaceQueryParam(X, null)` now, which fatals if the second parameter is `null`. I hit these legitimately, but I'll look for more callsites and follow up by either allowing this, removing `alter()`, fixing the callsites, or some combination.

(I'm not much of a fan of `alter()`.)

Test Plan: Browsing a paginated list no longer complains about URI construction.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13250

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

+9 -9
+9 -9
src/view/control/AphrontCursorPagerView.php
··· 99 99 return null; 100 100 } 101 101 102 - return $this->uri 103 - ->alter('before', null) 104 - ->alter('after', null); 102 + return id(clone $this->uri) 103 + ->removeQueryParam('after') 104 + ->removeQueryParam('before'); 105 105 } 106 106 107 107 public function getPrevPageURI() { ··· 113 113 return null; 114 114 } 115 115 116 - return $this->uri 117 - ->alter('after', null) 118 - ->alter('before', $this->prevPageID); 116 + return id(clone $this->uri) 117 + ->removeQueryParam('after') 118 + ->replaceQueryParam('before', $this->prevPageID); 119 119 } 120 120 121 121 public function getNextPageURI() { ··· 127 127 return null; 128 128 } 129 129 130 - return $this->uri 131 - ->alter('after', $this->nextPageID) 132 - ->alter('before', null); 130 + return id(clone $this->uri) 131 + ->replaceQueryParam('after', $this->nextPageID) 132 + ->removeQueryParam('before'); 133 133 } 134 134 135 135 public function render() {