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 8efef7df24
commit 3923b87057

View file

@ -450,7 +450,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) {