fix(dav): Adapt changes to stable28 code

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2025-10-20 11:50:44 +02:00
parent d04ef20e4b
commit 4cfc6e76a9
No known key found for this signature in database
GPG key ID: A3E2F658B28C760A

View file

@ -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) {