Skip to content

Commit e548062

Browse files
committed
fix(dav): Adapt changes to stable28 code
Signed-off-by: Côme Chilliet <[email protected]>
1 parent e164506 commit e548062

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

apps/dav/lib/DAV/CustomPropertiesBackend.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
use OCP\DB\QueryBuilder\IQueryBuilder;
3131
use OCP\IDBConnection;
3232
use OCP\IUser;
33+
use Sabre\DAV\Exception as DavException;
3334
use Sabre\DAV\PropertyStorage\Backend\BackendInterface;
3435
use Sabre\DAV\PropFind;
3536
use Sabre\DAV\PropPatch;
@@ -373,7 +374,7 @@ private function updateProperties(string $path, array $properties): bool {
373374
->executeStatement();
374375
}
375376
} else {
376-
[$value, $valueType] = $this->encodeValueForDatabase($propertyValue);
377+
[$value, $valueType] = $this->encodeValueForDatabase($propertyName, $propertyValue);
377378
$dbParameters['propertyValue'] = $value;
378379
$dbParameters['valueType'] = $valueType;
379380

@@ -431,7 +432,7 @@ private static function checkIsArrayOfScalar(string $name, array $array): void {
431432
* @param mixed $value
432433
* @return array
433434
*/
434-
private function encodeValueForDatabase($value): array {
435+
private function encodeValueForDatabase(string $name, $value): array {
435436
if (is_scalar($value)) {
436437
$valueType = self::PROPERTY_TYPE_STRING;
437438
} elseif ($value instanceof Complex) {

0 commit comments

Comments
 (0)