Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F84628
D7627.diff
All Users
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D7627.diff
View Options
diff --git a/src/applications/search/controller/PhabricatorApplicationSearchController.php b/src/applications/search/controller/PhabricatorApplicationSearchController.php
--- a/src/applications/search/controller/PhabricatorApplicationSearchController.php
+++ b/src/applications/search/controller/PhabricatorApplicationSearchController.php
@@ -198,7 +198,16 @@
$pager = new AphrontCursorPagerView();
$pager->readFromRequest($request);
- $pager->setPageSize($engine->getPageSize($saved_query));
+ $page_size = $engine->getPageSize($saved_query);
+ if (is_finite($page_size)) {
+ $pager->setPageSize($page_size);
+ } else {
+ // Consider an INF pagesize to mean a large finite pagesize.
+
+ // TODO: It would be nice to handle this more gracefully, but math
+ // with INF seems to vary across PHP versions, systems, and runtimes.
+ $pager->setPageSize(0xFFFF);
+ }
$objects = $query->setViewer($request->getUser())
->executeWithCursorPager($pager);
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
@@ -19,6 +19,11 @@
}
protected function getPagingValue($result) {
+ if (!is_object($result)) {
+ // This interface can't be typehinted and PHP gets really angry if we
+ // call a method on a non-object, so add an explicit check here.
+ throw new Exception(pht('Expected object, got "%s"!', gettype($result)));
+ }
return $result->getID();
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/jp/vk/fym7i75rufxxxtvr
Default Alt Text
D7627.diff (1 KB)
Attached To
Mode
D7627: Fix issue when paging Applications
Attached
Detach File
Event Timeline
Log In to Comment