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

Make Fulltext Search not crash when newResultObject() returns null

Summary:
Note that this is a forced crash. I was looking into Fulltext Search returning all and any objects also belonging to uninstalled applications, so I was experimenting with making `PhabricatorApplicationSearchEngine::newResultObject()` return `null` also when the corresponding application for the type of object is uninstalled (this method can already return `null`).
I believe it should not crash in this case.

Closes T16122

Test Plan:
1. Comment out code in `PhabricatorApplicationSearchEngine::newResultObject()` so this method will always return null (the current fallback)
2. Go to http://phorge.localhost/search/query/advanced/
3. Enter `bleh` in the `Query` field, hit the `Search` button
4. After applying the patch, get no crashes anymore (but incorrect search results not matching the entered search string but I consider that a separate problem, sorry)

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16122

Differential Revision: https://we.phorge.it/D26110

+3 -3
+1 -1
src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php
··· 137 137 $query->withImportSourcePHIDs($map['importSourcePHIDs']); 138 138 } 139 139 140 - if (!$map['ids'] && !$map['phids']) { 140 + if (empty($map['ids']) && empty($map['phids'])) { 141 141 $query 142 142 ->withIsStub(false) 143 143 ->setGenerateGhosts(true);
+2 -2
src/applications/maniphest/query/ManiphestTaskSearchEngine.php
··· 260 260 $query->setGroupBy($group); 261 261 } 262 262 263 - if ($map['ids']) { 264 - $ids = $map['ids']; 263 + $ids = idx($map, 'ids'); 264 + if ($ids) { 265 265 foreach ($ids as $key => $id) { 266 266 $id = trim($id, ' Tt'); 267 267 if (!$id || !is_numeric($id)) {