Page MenuHomePhabricator

D21824.id52011.diff
No OneTemporary

D21824.id52011.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
Sun, Mar 16, 10:53 AM (6 d, 16 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7227972
Default Alt Text
D21824.id52011.diff (986 B)

Event Timeline