@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Maniphest - fix fatal in custom query for users with no projects

Summary: See https://github.com/facebook/phabricator/issues/380 for report.

Test Plan: Maniphest -> Custom Query -> Put user with no project in "Any User Projects" field -> Search : observe no fatal

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6862

+21
+21
src/applications/maniphest/ManiphestTaskQuery.php
··· 201 201 return $this; 202 202 } 203 203 204 + /** 205 + * This is a wrapper until we finish T603. The newer query class this class 206 + * will inherit from handles catching this exception already. 207 + */ 204 208 public function execute() { 209 + 210 + try { 211 + $result = $this->executeManiphestQuery(); 212 + } catch (PhabricatorEmptyQueryException $ex) { 213 + $result = array(); 214 + if ($this->calculateRows) { 215 + $this->rowCount = 0; 216 + } 217 + } 218 + 219 + return $result; 220 + } 221 + 222 + private function executeManiphestQuery() { 205 223 206 224 $task_dao = new ManiphestTask(); 207 225 $conn = $task_dao->establishConnection('r'); ··· 505 523 ->withMemberPHIDs($this->anyUserProjectPHIDs) 506 524 ->execute(); 507 525 $any_user_project_phids = mpull($projects, 'getPHID'); 526 + if (!$any_user_project_phids) { 527 + throw new PhabricatorEmptyQueryException(); 528 + } 508 529 509 530 return qsprintf( 510 531 $conn,