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-01-27 14:54:46 +0300
commit92df34121d057c95c246275b4fe46675eeaa3257 (patch)
treee732d03d710f9b9a758cf65916159a3bab95ddce /lib
parent4fac0dcc66dbe8761fcc0a2926d0f7fc72cf69cd (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 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) {
}