Convert properties value to string before passing them to database

This avoids an error when passing a complex property to PROPPATCH under
 PHP >= 7.4.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/30771/head
Côme Chilliet 4 years ago
parent de9fe8fcc1
commit 40cdc54ae8
No known key found for this signature in database
GPG Key ID: A3E2F658B28C760A
  1. 5
      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,
[

Loading…
Cancel
Save