Skip to content

Commit c9fa1db

Browse files
Merge pull request #54230 from nextcloud/bugfix/spreed-15625/log-query-with-immutable-dates
fix(logging): Fix query logging with DateTimeImmutable parameters
2 parents ff30433 + c722f8c commit c9fa1db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/private/DB/QueryBuilder/QueryBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ private function prepareForExecute() {
161161
try {
162162
$params = [];
163163
foreach ($this->getParameters() as $placeholder => $value) {
164-
if ($value instanceof \DateTime) {
164+
if ($value instanceof \DateTimeInterface) {
165165
$params[] = $placeholder . ' => DateTime:\'' . $value->format('c') . '\'';
166166
} elseif (is_array($value)) {
167167
$params[] = $placeholder . ' => (\'' . implode('\', \'', $value) . '\')';

0 commit comments

Comments
 (0)