aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-11-14 16:23:50 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2022-11-14 16:23:50 +0100
commit9ba9f9a7dcd7654336fa714cbd178f6a2c1710a8 (patch)
treeea38b76ffad8bf87890cb6325db30869179f5914 /apps/dav
parentea377578ad50809c13e792acfa2bc1bd6b94df24 (diff)
downloadnextcloud-server-9ba9f9a7dcd7654336fa714cbd178f6a2c1710a8.tar.gz
nextcloud-server-9ba9f9a7dcd7654336fa714cbd178f6a2c1710a8.zip
Make sure to not pass null to DateTime::createFromFormat
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/Files/FileSearchBackend.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/dav/lib/Files/FileSearchBackend.php b/apps/dav/lib/Files/FileSearchBackend.php
index c819fa6afc6..524f90e6623 100644
--- a/apps/dav/lib/Files/FileSearchBackend.php
+++ b/apps/dav/lib/Files/FileSearchBackend.php
@@ -55,7 +55,7 @@ use SearchDAV\Query\Order;
use SearchDAV\Query\Query;
class FileSearchBackend implements ISearchBackend {
- const OPERATOR_LIMIT = 100;
+ public const OPERATOR_LIMIT = 100;
/** @var CachingTree */
private $tree;
@@ -432,7 +432,7 @@ class FileSearchBackend implements ISearchBackend {
if (is_numeric($value)) {
return max(0, 0 + $value);
}
- $date = \DateTime::createFromFormat(\DateTimeInterface::ATOM, $value);
+ $date = \DateTime::createFromFormat(\DateTimeInterface::ATOM, (string)$value);
return ($date instanceof \DateTime && $date->getTimestamp() !== false) ? $date->getTimestamp() : 0;
default:
return $value;