@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.

Fix "Any Owner" and "No Owners" searches in Maniphest

Summary:
See <https://discourse.phabricator-community.org/t/maniphest-home-page-crash-after-d19417/1445/3>. These special-token-only searches currently end up populating an empty `ownerPHIDs`, which fatals after the stricter check in D19417.

Make the fatal on `withConstraint(array())` explicit and only set the PHID constraint if we have some PHIDs left.

Test Plan: Searched for "No Owner", "Any Owner", an actual owner, "No Owner + actual user".

Reviewers: amckinley

Reviewed By: amckinley

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

+9 -1
+9 -1
src/applications/maniphest/query/ManiphestTaskQuery.php
··· 73 73 } 74 74 75 75 public function withOwners(array $owners) { 76 + if ($owners === array()) { 77 + throw new Exception(pht('Empty withOwners() constraint is not valid.')); 78 + } 79 + 76 80 $no_owner = PhabricatorPeopleNoOwnerDatasource::FUNCTION_TOKEN; 77 81 $any_owner = PhabricatorPeopleAnyOwnerDatasource::FUNCTION_TOKEN; 78 82 ··· 88 92 break; 89 93 } 90 94 } 91 - $this->ownerPHIDs = $owners; 95 + 96 + if ($owners) { 97 + $this->ownerPHIDs = $owners; 98 + } 99 + 92 100 return $this; 93 101 } 94 102