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
parent e01a54c53a
commit 9177e4e020
No known key found for this signature in database
GPG key ID: 7E849AE05218500F

View file

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