disallow negative mtime in dav search
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
a0b84bc0fc
commit
b76e6be441
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue