Merge pull request #30771 from nextcloud/fix/proppatch-convert-complex-properties

Convert properties value to string before passing them to database
pull/30783/head
Côme Chilliet 2022-01-20 18:31:32 +07:00 committed by GitHub
commit 9b5245facf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

@ -303,6 +303,11 @@ class CustomPropertiesBackend implements BackendInterface {
);
}
} else {
if ($propertyValue instanceOf \Sabre\DAV\Xml\Property\Complex) {
$propertyValue = $propertyValue->getXml();
} elseif (!is_string($propertyValue)) {
$propertyValue = (string)$propertyValue;
}
if (!array_key_exists($propertyName, $existing)) {
$this->connection->executeUpdate($insertStatement,
[