Merge pull request #54254 from nextcloud/backport/54230/stable31

[stable31] fix(logging): Fix query logging with DateTimeImmutable parameters
This commit is contained in:
Joas Schilling 2025-08-05 16:18:09 +02:00 committed by GitHub
commit 98fb18f5fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -161,7 +161,7 @@ class QueryBuilder implements IQueryBuilder {
try {
$params = [];
foreach ($this->getParameters() as $placeholder => $value) {
if ($value instanceof \DateTime) {
if ($value instanceof \DateTimeInterface) {
$params[] = $placeholder . ' => DateTime:\'' . $value->format('c') . '\'';
} elseif (is_array($value)) {
$params[] = $placeholder . ' => (\'' . implode('\', \'', $value) . '\')';