diff options
author | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2022-01-20 18:31:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 18:31:32 +0100 |
commit | 9b5245facf01971d4e3fcc78e79dca65c47b45c9 (patch) | |
tree | 87c89c37effd75f21e69e738f7d01cd0c709f31f /apps | |
parent | 7f7980f35cdd40d113083d8cceb95e6c7613b004 (diff) | |
parent | 40cdc54ae8b5189ed4e104bf0faa17d908b2f7d6 (diff) | |
download | nextcloud-server-9b5245facf01971d4e3fcc78e79dca65c47b45c9.tar.gz nextcloud-server-9b5245facf01971d4e3fcc78e79dca65c47b45c9.zip |
Merge pull request #30771 from nextcloud/fix/proppatch-convert-complex-properties
Convert properties value to string before passing them to database
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/lib/DAV/CustomPropertiesBackend.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/dav/lib/DAV/CustomPropertiesBackend.php b/apps/dav/lib/DAV/CustomPropertiesBackend.php index 1bd207e0967..5f512995ce8 100644 --- a/apps/dav/lib/DAV/CustomPropertiesBackend.php +++ b/apps/dav/lib/DAV/CustomPropertiesBackend.php @@ -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, [ |