[COMPONENT][Collection] If invalid term, just perform a regular search for it

This commit is contained in:
Diogo Peralta Cordeiro 2022-02-21 04:48:18 +00:00
parent 1e310aa124
commit 59380ed2ac
Signed by: diogo
GPG Key ID: 18D2D35001FBFAB0
1 changed files with 2 additions and 1 deletions

View File

@ -80,7 +80,8 @@ abstract class Parser
$actor_res = null; $actor_res = null;
Event::handle('CollectionQueryCreateExpression', [$eb, $term, $locale, $actor, &$note_res, &$actor_res]); Event::handle('CollectionQueryCreateExpression', [$eb, $term, $locale, $actor, &$note_res, &$actor_res]);
if (\is_null($note_res) && \is_null($actor_res)) { // @phpstan-ignore-line if (\is_null($note_res) && \is_null($actor_res)) { // @phpstan-ignore-line
throw new ServerException("No one claimed responsibility for a match term: {$term}"); //throw new ServerException("No one claimed responsibility for a match term: {$term}");
// It's okay if the term doesn't exist, just perform a regular search
} }
if (!empty($note_res)) { // @phpstan-ignore-line if (!empty($note_res)) { // @phpstan-ignore-line
if (\is_array($note_res)) { if (\is_array($note_res)) {