From c9938e54a69eec64c56140501f03e75820d51568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 18 Mar 2025 15:47:29 +0100 Subject: [PATCH] fix(sharebymail): Fix activity rich object id type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes "Object for placeholder file is invalid, value 21 for key id is not a string" Exception spotted in tests logs. Signed-off-by: Côme Chilliet --- apps/sharebymail/lib/Activity.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/sharebymail/lib/Activity.php b/apps/sharebymail/lib/Activity.php index ae3407c1e2b..7e9389da060 100644 --- a/apps/sharebymail/lib/Activity.php +++ b/apps/sharebymail/lib/Activity.php @@ -233,12 +233,12 @@ class Activity implements IProvider { /** * @param int $id * @param string $path - * @return array + * @return array */ - protected function generateFileParameter($id, $path) { + protected function generateFileParameter($id, $path): array { return [ 'type' => 'file', - 'id' => $id, + 'id' => (string)$id, 'name' => basename($path), 'path' => trim($path, '/'), 'link' => $this->url->linkToRouteAbsolute('files.viewcontroller.showFile', ['fileid' => $id]),