From f301b12c7bf5902c747c86b0bc48fb1d16de3c1b Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 19 Sep 2017 17:18:04 +0200 Subject: [PATCH] Fix undefined offset warning when using '/' as external storage root Signed-off-by: Robin Appelman --- apps/files_external/lib/Lib/Api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_external/lib/Lib/Api.php b/apps/files_external/lib/Lib/Api.php index 82dd377cd16..6b10443bbdc 100644 --- a/apps/files_external/lib/Lib/Api.php +++ b/apps/files_external/lib/Lib/Api.php @@ -39,7 +39,7 @@ class Api { private static function formatMount($mountPoint, $mountConfig) { // strip "/$user/files" from mount point $mountPoint = explode('/', trim($mountPoint, '/'), 3); - $mountPoint = $mountPoint[2]; + $mountPoint = isset($mountPoint[2]) ? $mountPoint[2] : ''; // split path from mount point $path = dirname($mountPoint); -- 2.39.5