From 92df34121d057c95c246275b4fe46675eeaa3257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 24 Jan 2020 16:06:03 +0100 Subject: [PATCH] Use string as a filename MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Service/DocumentService.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Service/DocumentService.php b/lib/Service/DocumentService.php index 30836e9c0..6f571c3a5 100644 --- a/lib/Service/DocumentService.php +++ b/lib/Service/DocumentService.php @@ -148,9 +148,9 @@ class DocumentService { } try { - $documentBaseFile = $this->appData->getFolder('documents')->getFile($file->getFileInfo()->getId()); + $documentBaseFile = $this->appData->getFolder('documents')->getFile((string)$file->getFileInfo()->getId()); } catch (NotFoundException $e) { - $documentBaseFile = $this->appData->getFolder('documents')->newFile($file->getFileInfo()->getId()); + $documentBaseFile = $this->appData->getFolder('documents')->newFile((string)$file->getFileInfo()->getId()); } $documentBaseFile->putContent($file->fopen('r')); @@ -302,7 +302,7 @@ class DocumentService { $this->documentMapper->delete($document); try { - $this->appData->getFolder('documents')->getFile($documentId)->delete(); + $this->appData->getFolder('documents')->getFile((string)$documentId)->delete(); } catch (NotFoundException $e) { } catch (NotPermittedException $e) { }