Skip to content

Commit 9b5245f

Browse files
authored
Merge pull request #30771 from nextcloud/fix/proppatch-convert-complex-properties
Convert properties value to string before passing them to database
2 parents 7f7980f + 40cdc54 commit 9b5245f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

apps/dav/lib/DAV/CustomPropertiesBackend.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,11 @@ private function updateProperties(string $path, array $properties) {
303303
);
304304
}
305305
} else {
306+
if ($propertyValue instanceOf \Sabre\DAV\Xml\Property\Complex) {
307+
$propertyValue = $propertyValue->getXml();
308+
} elseif (!is_string($propertyValue)) {
309+
$propertyValue = (string)$propertyValue;
310+
}
306311
if (!array_key_exists($propertyName, $existing)) {
307312
$this->connection->executeUpdate($insertStatement,
308313
[

0 commit comments

Comments
 (0)