fix(dav): properly handle files metadata

`PropFind::handle` expects a callable and fallsback to value,
but if you pass a string like `Date` thats also a callable for PHP.
So always put the value as the return value of a callable.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
Ferdinand Thiessen 2026-06-07 17:12:56 +02:00 committed by backportbot[bot]
parent 4815f6755d
commit e51978c2a5

View file

@ -453,7 +453,7 @@ class FilesPlugin extends ServerPlugin {
});
foreach ($node->getFileInfo()->getMetadata() as $metadataKey => $metadataValue) {
$propFind->handle(self::FILE_METADATA_PREFIX . $metadataKey, $metadataValue);
$propFind->handle(self::FILE_METADATA_PREFIX . $metadataKey, fn () => $metadataValue);
}
$propFind->handle(self::HIDDEN_PROPERTYNAME, function () use ($node) {