Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-01-24 18:06:03 +0300
committerJulius Härtl <jus@bitgrid.net>2020-02-04 21:10:18 +0300
commit168edb30e3a79c9328d126a99971135ebcfa267d (patch)
tree8fa344165a34688247b43a48ad7d9f9fcaa1d682 /lib
parentf217bddb9361f36ecbd181a837e24d4bb15574dc (diff)
Use string as a filename
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/Service/DocumentService.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Service/DocumentService.php b/lib/Service/DocumentService.php
index 730c064d9..af19f7bc0 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) {
}