diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-08-28 16:52:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-28 16:52:20 +0200 |
commit | e9dd6aec61501114be22eaa10e952a8b6a3d275b (patch) | |
tree | 1d4d3413b967b3f2546cc48385580f63141480ca | |
parent | 90581a44c03c72ef7126393adfab23178b30ae39 (diff) | |
parent | e2a64c713ff103cdeb4c8320de792487218d49ca (diff) | |
download | nextcloud-server-e9dd6aec61501114be22eaa10e952a8b6a3d275b.tar.gz nextcloud-server-e9dd6aec61501114be22eaa10e952a8b6a3d275b.zip |
Merge pull request #10871 from cviereck/patch-1
cast timestamps older than unix epoch to 0
-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 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; } |