diff options
author | Christian <16852529+cviereck@users.noreply.github.com> | 2018-08-27 07:44:24 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2018-08-28 16:57:42 +0200 |
commit | ed5224cd46e99d9aed65ba15bea147c9318bd129 (patch) | |
tree | 2c6f83b26e59c448b781d0b1dba7c5c5f631a138 /apps/dav | |
parent | a4daa91b4277d48b513a3b2e15427305fbf85a93 (diff) | |
download | nextcloud-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.php | 2 |
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; } |