disallow negative mtime in dav search

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2018-08-24 16:20:07 +02:00
parent a0b84bc0fc
commit b76e6be441
1 changed files with 1 additions and 1 deletions

View File

@ -352,7 +352,7 @@ class FileSearchBackend implements ISearchBackend {
return 0 + $value;
case SearchPropertyDefinition::DATATYPE_DATETIME:
if (is_numeric($value)) {
return 0 + $value;
return max(0, 0 + $value);
}
$date = \DateTime::createFromFormat(\DateTime::ATOM, $value);
return ($date instanceof \DateTime) ? $date->getTimestamp() : 0;