Skip to content

Commit

Permalink
Fix unhandled exception in occ search command
Browse files Browse the repository at this point in the history
Fix for  unhandled exception, when SearchService is being used by
occ fulltextsearch:search command.
We ensure, that userId member of SearchService is set properly.

This commit fixes issue #72

Signed-off-by: Maciek Barczak <[email protected]>
  • Loading branch information
Maciek Barczak authored and backportbot[bot] committed Apr 23, 2021
1 parent 6c87d75 commit c9766fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Service/SearchService.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ public function improveSearchRequest(ISearchRequest $request) {
$this->searchQueryInOptions($request);
$this->searchQueryFiltersExtension($request);
$this->searchQueryFiltersSource($request);

if($this->userId === null) {
$this->userId = $this->miscService->secureUsername($request->getAuthor());
}
$request->addPart('comments');
$this->extensionService->searchRequest($request);
}
Expand Down

0 comments on commit c9766fb

Please sign in to comment.