mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 01:00:50 -04:00
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>
This commit is contained in:
parent
de9fe8fcc1
commit
40cdc54ae8
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,
|
||||
[
|
||||
|
|
|
|||
Loading…
Reference in a new issue