]> source.dussan.org Git - nextcloud-server.git/commitdiff
first check if a extension exists before comparing it
authorBjoern Schiessle <schiessle@owncloud.com>
Tue, 27 Aug 2013 12:19:30 +0000 (14:19 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Fri, 6 Sep 2013 14:05:03 +0000 (16:05 +0200)
apps/files_encryption/lib/util.php

index 73191de5681c17fde5f53d0ddbeeee665d00181e..62f82ce1a969a3d7f9826dee65d7f656bf107747 100644 (file)
@@ -1292,7 +1292,7 @@ class Util {
                $pathinfo = pathinfo($path);
                $partfile = false;
                $parentFolder = false;
-               if ($pathinfo['extension'] === 'part') {
+               if (array_key_exists('extension', $pathinfo) && $pathinfo['extension'] === 'part') {
                        // if the real file exists we check this file
                        if ($this->view->file_exists($this->userFilesDir . '/' . $pathinfo['dirname'] . '/' . $pathinfo['filename'])) {
                                $pathToCheck = $pathinfo['dirname'] . '/' . $pathinfo['filename'];