mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-25 16:22:43 +01:00
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
This commit is contained in:
parent
5892c78986
commit
be21dd3b52
1 changed files with 9 additions and 9 deletions
|
@ -99,9 +99,9 @@ final class AphrontCursorPagerView extends AphrontView {
|
|||
return null;
|
||||
}
|
||||
|
||||
return $this->uri
|
||||
->alter('before', null)
|
||||
->alter('after', null);
|
||||
return id(clone $this->uri)
|
||||
->removeQueryParam('after')
|
||||
->removeQueryParam('before');
|
||||
}
|
||||
|
||||
public function getPrevPageURI() {
|
||||
|
@ -113,9 +113,9 @@ final class AphrontCursorPagerView extends AphrontView {
|
|||
return null;
|
||||
}
|
||||
|
||||
return $this->uri
|
||||
->alter('after', null)
|
||||
->alter('before', $this->prevPageID);
|
||||
return id(clone $this->uri)
|
||||
->removeQueryParam('after')
|
||||
->replaceQueryParam('before', $this->prevPageID);
|
||||
}
|
||||
|
||||
public function getNextPageURI() {
|
||||
|
@ -127,9 +127,9 @@ final class AphrontCursorPagerView extends AphrontView {
|
|||
return null;
|
||||
}
|
||||
|
||||
return $this->uri
|
||||
->alter('after', $this->nextPageID)
|
||||
->alter('before', null);
|
||||
return id(clone $this->uri)
|
||||
->replaceQueryParam('after', $this->nextPageID)
|
||||
->removeQueryParam('before');
|
||||
}
|
||||
|
||||
public function render() {
|
||||
|
|
Loading…
Reference in a new issue