Skip to content

Commit e9dd6ae

Browse files
authored
Merge pull request #10871 from cviereck/patch-1
cast timestamps older than unix epoch to 0
2 parents 90581a4 + e2a64c7 commit e9dd6ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/dav/lib/Files/FileSearchBackend.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ private function castValue(SearchPropertyDefinition $property, $value) {
355355
return max(0, 0 + $value);
356356
}
357357
$date = \DateTime::createFromFormat(\DateTime::ATOM, $value);
358-
return ($date instanceof \DateTime) ? $date->getTimestamp() : 0;
358+
return ($date instanceof \DateTime && $date->getTimestamp() !== false) ? $date->getTimestamp() : 0;
359359
default:
360360
return $value;
361361
}

0 commit comments

Comments
 (0)