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

Convert properties value to string before passing them to database
This commit is contained in:
Côme Chilliet 2022-01-20 18:31:32 +01:00 committed by GitHub
commit 9b5245facf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,
[