diff options
author | Dominique Fournier <dominique.fournier@grenoble.cnrs.fr> | 2020-09-10 14:26:03 +0300 |
---|---|---|
committer | Dominique Fournier <dominique.fournier@grenoble.cnrs.fr> | 2020-09-10 14:26:03 +0300 |
commit | 01c6e632c27d39858d5efc9b3eaf63e3b7f3b60a (patch) | |
tree | bf0c82c295b83e9a7d38e02c9cb71cec8e28c549 | |
parent | 750edc9dc168f12278eb9da4782463d872ec980a (diff) |
Empty search validated : do not generate a log "strstr(): Empty needle at /var/www/html/nextcloud/apps/carnet/lib/Misc/Search.php#152"
-rw-r--r-- | lib/Misc/Search.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Misc/Search.php b/lib/Misc/Search.php index cdcf303..3ee11a0 100644 --- a/lib/Misc/Search.php +++ b/lib/Misc/Search.php @@ -149,7 +149,7 @@ private function search($relativePath, $folder, $query, $curDepth){ } catch(Exception $e){ } $index = $zipFile->getEntryContents("index.html"); - if(strstr(strtolower($this->removeAccents($index)), $query)){ + if(trim ($query) !== "" && strstr(strtolower($this->removeAccents($index)), $query)){ $this->writeFound($relativePath,$in); } } catch(\OCP\Files\NotFoundException $e) { |