From c431d91f58b886c45b397f56802f0dd89dfe0283 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 14 Mar 2015 13:23:48 -0700 Subject: [PATCH] Fail explicitly instead of looping if we can't build a paging clause Ref T7548. This isn't a complete fix but hopefully will give me more debugging information. --- src/applications/maniphest/query/ManiphestTaskQuery.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/applications/maniphest/query/ManiphestTaskQuery.php b/src/applications/maniphest/query/ManiphestTaskQuery.php index 0aee36dcce..c8883c4145 100644 --- a/src/applications/maniphest/query/ManiphestTaskQuery.php +++ b/src/applications/maniphest/query/ManiphestTaskQuery.php @@ -979,7 +979,9 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery { $cursor = $this->loadCursorObject($task_id); if (!$cursor) { - return null; + // We may loop if we have a cursor and don't build a paging clause; fail + // instead. + throw new PhabricatorEmptyQueryException(); } $columns = array();