From 4cfc6e76a936cb75642331522572f464c9138434 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 20 Oct 2025 11:50:44 +0200 Subject: [PATCH] fix(dav): Adapt changes to stable28 code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- apps/dav/lib/DAV/CustomPropertiesBackend.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/dav/lib/DAV/CustomPropertiesBackend.php b/apps/dav/lib/DAV/CustomPropertiesBackend.php index b6e0beaa98f..8b408b09cf3 100644 --- a/apps/dav/lib/DAV/CustomPropertiesBackend.php +++ b/apps/dav/lib/DAV/CustomPropertiesBackend.php @@ -30,6 +30,7 @@ use OCA\DAV\Connector\Sabre\Directory; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IDBConnection; use OCP\IUser; +use Sabre\DAV\Exception as DavException; use Sabre\DAV\PropertyStorage\Backend\BackendInterface; use Sabre\DAV\PropFind; use Sabre\DAV\PropPatch; @@ -373,7 +374,7 @@ class CustomPropertiesBackend implements BackendInterface { ->executeStatement(); } } else { - [$value, $valueType] = $this->encodeValueForDatabase($propertyValue); + [$value, $valueType] = $this->encodeValueForDatabase($propertyName, $propertyValue); $dbParameters['propertyValue'] = $value; $dbParameters['valueType'] = $valueType; @@ -431,7 +432,7 @@ class CustomPropertiesBackend implements BackendInterface { * @param mixed $value * @return array */ - private function encodeValueForDatabase($value): array { + private function encodeValueForDatabase(string $name, $value): array { if (is_scalar($value)) { $valueType = self::PROPERTY_TYPE_STRING; } elseif ($value instanceof Complex) {