From 404e36323a06c4c01eea1ccb2d97306e570ec6cc Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle <schiessle@owncloud.com> Date: Tue, 27 Aug 2013 14:19:30 +0200 Subject: [PATCH] first check if a extension exists before comparing it --- apps/files_encryption/lib/util.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php index 73191de568..62f82ce1a9 100644 --- a/apps/files_encryption/lib/util.php +++ b/apps/files_encryption/lib/util.php @@ -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']; -- GitLab