summaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-08-31 09:09:12 +0200
committerGitHub <noreply@github.com>2018-08-31 09:09:12 +0200
commit2f024dcd02210418bb49c0cab2a9b803fa267d84 (patch)
tree4de50043e95d7b2b5a29a83acaed70be078930c5 /apps/dav
parent9bde06aab3d502fec8577fca268f4acb5383d750 (diff)
parented5224cd46e99d9aed65ba15bea147c9318bd129 (diff)
downloadnextcloud-server-2f024dcd02210418bb49c0cab2a9b803fa267d84.tar.gz
nextcloud-server-2f024dcd02210418bb49c0cab2a9b803fa267d84.zip
Merge pull request #10902 from nextcloud/cast-timestamp-13
[13] cast timestamps older than unix epoch to 0
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;
}