summaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorChristian <16852529+cviereck@users.noreply.github.com>2018-08-27 07:44:24 +0200
committerGitHub <noreply@github.com>2018-08-27 07:44:24 +0200
commite2a64c713ff103cdeb4c8320de792487218d49ca (patch)
treee2104f123cb56439dd592ccda979fbb0f66bf086 /apps/dav
parent8b47f45afa3b7837032d6ce1cfcda1c901ae840f (diff)
downloadnextcloud-server-e2a64c713ff103cdeb4c8320de792487218d49ca.tar.gz
nextcloud-server-e2a64c713ff103cdeb4c8320de792487218d49ca.zip
cast timestamps older than unix epoch to 0
This change solves issues #10870, which is caused by method castValue of class FileSearchBackend: It casts the timestamps older than the unix epoch to false., see my comment https://github.com/nextcloud/server/pull/10835#discussion_r212806153.
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/Files/FileSearchBackend.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/dav/lib/Files/FileSearchBackend.php b/apps/dav/lib/Files/FileSearchBackend.php
index cac6e8ac52b..0157ae038cb 100644
--- a/apps/dav/lib/Files/FileSearchBackend.php
+++ b/apps/dav/lib/Files/FileSearchBackend.php
@@ -355,7 +355,7 @@ class FileSearchBackend implements ISearchBackend {
return max(0, 0 + $value);
}
$date = \DateTime::createFromFormat(\DateTime::ATOM, $value);
- return ($date instanceof \DateTime) ? $date->getTimestamp() : 0;
+ return ($date instanceof \DateTime && $date->getTimestamp() !== false) ? $date->getTimestamp() : 0;
default:
return $value;
}