Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(dav): Adapt changes to stable28 code
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
  • Loading branch information
come-nc committed Oct 20, 2025
commit e5480625c41816e7647832eae922e0c462ebc613
5 changes: 3 additions & 2 deletions apps/dav/lib/DAV/CustomPropertiesBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
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;
Expand Down Expand Up @@ -373,7 +374,7 @@
->executeStatement();
}
} else {
[$value, $valueType] = $this->encodeValueForDatabase($propertyValue);
[$value, $valueType] = $this->encodeValueForDatabase($propertyName, $propertyValue);
$dbParameters['propertyValue'] = $value;
$dbParameters['valueType'] = $valueType;

Expand Down Expand Up @@ -431,7 +432,7 @@
* @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) {
Expand Down Expand Up @@ -464,7 +465,7 @@
/**
* @return mixed|Complex|string
*/
private function decodeValueFromDatabase(string $value, int $valueType): mixed {

Check failure on line 468 in apps/dav/lib/DAV/CustomPropertiesBackend.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

ReservedWord

apps/dav/lib/DAV/CustomPropertiesBackend.php:468:75: ReservedWord: mixed is a reserved word (see https://psalm.dev/095)

Check failure on line 468 in apps/dav/lib/DAV/CustomPropertiesBackend.php

View workflow job for this annotation

GitHub Actions / Psalm

mixed is a reserved word (see https://psalm.dev/095)
switch ($valueType) {
case self::PROPERTY_TYPE_XML:
return new Complex($value);
Expand Down
Loading