aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Onderka <ahoj@jakubonderka.cz>2019-08-06 10:55:13 +0200
committerJakub Onderka <jakub.onderka@gmail.com>2019-08-07 16:04:09 +0200
commit41f8be47eb4840f459cf3e99631d9b9cbb983699 (patch)
tree48447ea3ae648e5c5153d1455015e57aabf540fb
parenteffca30d1057deb56ed181662ffc3549ddca06e5 (diff)
downloadnextcloud-server-41f8be47eb4840f459cf3e99631d9b9cbb983699.tar.gz
nextcloud-server-41f8be47eb4840f459cf3e99631d9b9cbb983699.zip
files_trashbin: File can be without extension
Signed-off-by: Jakub Onderka <jakub.onderka@gmail.com>
-rw-r--r--apps/files_trashbin/lib/Controller/PreviewController.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_trashbin/lib/Controller/PreviewController.php b/apps/files_trashbin/lib/Controller/PreviewController.php
index ace3d10bf98..5f4419b3e50 100644
--- a/apps/files_trashbin/lib/Controller/PreviewController.php
+++ b/apps/files_trashbin/lib/Controller/PreviewController.php
@@ -103,7 +103,7 @@ class PreviewController extends Controller {
}
$pathParts = pathinfo($file->getName());
- $extension = $pathParts['extension'];
+ $extension = $pathParts['extension'] ?? '';
$fileName = $pathParts['filename'];
/*
* Files in the root of the trashbin are timetamped.