}
// Optionally filter the results:
- $linksToDisplay = $this->linkDB->search($userInput, null, false, false, true);
+ $linksToDisplay = $this->linkDB->search($userInput ?? [], null, false, false, true);
$nblinksToDisplay = $this->getNbLinks(count($linksToDisplay), $userInput);