]> source.dussan.org Git - nextcloud-server.git/commitdiff
files_trashbin: File can be without extension 16663/head
authorJakub Onderka <ahoj@jakubonderka.cz>
Tue, 6 Aug 2019 08:55:13 +0000 (10:55 +0200)
committerJakub Onderka <jakub.onderka@gmail.com>
Wed, 7 Aug 2019 14:04:09 +0000 (16:04 +0200)
Signed-off-by: Jakub Onderka <jakub.onderka@gmail.com>
apps/files_trashbin/lib/Controller/PreviewController.php

index ace3d10bf98a4ea4fd18b4174bf1eded08d70721..5f4419b3e50791057baf134eb204f907680fce02 100644 (file)
@@ -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.