From 60da804d3dfff80c055076da799c539e06ae557d Mon Sep 17 00:00:00 2001 From: Jonathan Lomas Date: Fri, 15 Jun 2012 15:41:20 -0700 Subject: [PATCH] Add query limit of PHP_INT_MAX and handle the case where there are no fulltext results. --- src/applications/maniphest/ManiphestTaskQuery.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/applications/maniphest/ManiphestTaskQuery.php b/src/applications/maniphest/ManiphestTaskQuery.php index 729eb07276..1ab0880d59 100644 --- a/src/applications/maniphest/ManiphestTaskQuery.php +++ b/src/applications/maniphest/ManiphestTaskQuery.php @@ -353,10 +353,15 @@ final class ManiphestTaskQuery { // fulltext search, and then use that to limit the rest of the search $fulltext_query = new PhabricatorSearchQuery(); $fulltext_query->setQuery($this->fullTextSearch); + $fulltext_query->setParameter('limit', PHP_INT_MAX); $engine = PhabricatorSearchEngineSelector::newSelector()->newEngine(); $fulltext_results = $engine->executeSearch($fulltext_query); + if (empty($fulltext_results)) { + $fulltext_results = array(null); + } + return qsprintf( $conn, 'phid IN (%Ls)',