Page MenuHomePhabricator

D21824.diff
No OneTemporary

D21824.diff

diff --git a/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php b/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php
--- a/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php
+++ b/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php
@@ -369,10 +369,13 @@
$this->setLimit($limit + 1);
- if (phutil_nonempty_string($pager->getAfterID())) {
- $this->setExternalCursorString($pager->getAfterID());
- } else if ($pager->getBeforeID()) {
- $this->setExternalCursorString($pager->getBeforeID());
+ $after_id = phutil_string_cast($pager->getAfterID());
+ $before_id = phutil_string_cast($pager->getBeforeID());
+
+ if (phutil_nonempty_string($after_id)) {
+ $this->setExternalCursorString($after_id);
+ } else if (phutil_nonempty_string($before_id)) {
+ $this->setExternalCursorString($before_id);
$this->setIsQueryOrderReversed(true);
}

File Metadata

Mime Type
text/plain
Expires
May 14 2024, 5:41 AM (5 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6285028
Default Alt Text
D21824.diff (986 B)

Event Timeline