Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14036745
D7627.diff
No One
Temporary
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
Index: src/applications/search/controller/PhabricatorApplicationSearchController.php
===================================================================
--- src/applications/search/controller/PhabricatorApplicationSearchController.php
+++ 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);
Index: src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php
===================================================================
--- src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php
+++ 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/plain
Expires
Mon, Nov 11, 11:52 AM (3 d, 11 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6719780
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