From 6b0bce8a2df37730636bdb69fa83d62276d47f5f Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Thu, 7 Aug 2025 01:23:10 +0200 Subject: [PATCH 1/2] fix(files_trashbin): `has-preview` must return `true` or `false` Currently it returned the boolean value, but PHP will turn it into an integer... Signed-off-by: Ferdinand Thiessen --- apps/files_trashbin/lib/Sabre/TrashbinPlugin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files_trashbin/lib/Sabre/TrashbinPlugin.php b/apps/files_trashbin/lib/Sabre/TrashbinPlugin.php index 36237ca080b..54bb1326966 100644 --- a/apps/files_trashbin/lib/Sabre/TrashbinPlugin.php +++ b/apps/files_trashbin/lib/Sabre/TrashbinPlugin.php @@ -104,8 +104,8 @@ class TrashbinPlugin extends ServerPlugin { return $node->getFileId(); }); - $propFind->handle(FilesPlugin::HAS_PREVIEW_PROPERTYNAME, function () use ($node) { - return $this->previewManager->isAvailable($node->getFileInfo()); + $propFind->handle(FilesPlugin::HAS_PREVIEW_PROPERTYNAME, function () use ($node): string { + return $this->previewManager->isAvailable($node->getFileInfo()) ? 'true' : 'false'; }); $propFind->handle(FilesPlugin::MOUNT_TYPE_PROPERTYNAME, function () { From 378ddda3018f1dfa2aa432956583ac4ec1217161 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Thu, 7 Aug 2025 01:24:07 +0200 Subject: [PATCH 2/2] fix(files_versions): `has-preview` must be either `true` or `false` Signed-off-by: Ferdinand Thiessen --- apps/files_versions/lib/Sabre/Plugin.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/files_versions/lib/Sabre/Plugin.php b/apps/files_versions/lib/Sabre/Plugin.php index 4b4cb0638bf..984c4a36e5b 100644 --- a/apps/files_versions/lib/Sabre/Plugin.php +++ b/apps/files_versions/lib/Sabre/Plugin.php @@ -82,7 +82,10 @@ class Plugin extends ServerPlugin { if ($node instanceof VersionFile) { $propFind->handle(self::VERSION_LABEL, fn () => $node->getMetadataValue(self::LABEL)); $propFind->handle(self::VERSION_AUTHOR, fn () => $node->getMetadataValue(self::AUTHOR)); - $propFind->handle(FilesPlugin::HAS_PREVIEW_PROPERTYNAME, fn () => $this->previewManager->isMimeSupported($node->getContentType())); + $propFind->handle( + FilesPlugin::HAS_PREVIEW_PROPERTYNAME, + fn (): string => $this->previewManager->isMimeSupported($node->getContentType()) ? 'true' : 'false', + ); } }