Merge pull request #10871 from cviereck/patch-1
cast timestamps older than unix epoch to 0
This commit is contained in:
commit
e9dd6aec61
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue