Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CarnetApp/CarnetNextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominique Fournier <dominique.fournier@grenoble.cnrs.fr>2020-09-10 14:26:03 +0300
committerDominique Fournier <dominique.fournier@grenoble.cnrs.fr>2020-09-10 14:26:03 +0300
commit01c6e632c27d39858d5efc9b3eaf63e3b7f3b60a (patch)
treebf0c82c295b83e9a7d38e02c9cb71cec8e28c549
parent750edc9dc168f12278eb9da4782463d872ec980a (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.php2
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) {