summaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorChristian <16852529+cviereck@users.noreply.github.com>2018-08-27 07:44:24 +0200
committerRobin Appelman <robin@icewind.nl>2018-08-28 16:57:42 +0200
commited5224cd46e99d9aed65ba15bea147c9318bd129 (patch)
tree2c6f83b26e59c448b781d0b1dba7c5c5f631a138 /apps/dav
parenta4daa91b4277d48b513a3b2e15427305fbf85a93 (diff)
downloadnextcloud-server-ed5224cd46e99d9aed65ba15bea147c9318bd129.tar.gz
nextcloud-server-ed5224cd46e99d9aed65ba15bea147c9318bd129.zip
cast timestamps older than unix epoch to 0
Signed-off-by: Robin Appelman <robin@icewind.nl>
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 17a4c2b1394..1ea5f914e10 100644
--- a/apps/dav/lib/Files/FileSearchBackend.php
+++ b/apps/dav/lib/Files/FileSearchBackend.php
@@ -273,7 +273,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;
}