From: Robin Appelman Date: Tue, 19 Sep 2017 15:18:04 +0000 (+0200) Subject: Fix undefined offset warning when using '/' as external storage root X-Git-Tag: v12.0.4RC1~50^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f301b12c7bf5902c747c86b0bc48fb1d16de3c1b;p=nextcloud-server.git Fix undefined offset warning when using '/' as external storage root Signed-off-by: Robin Appelman --- 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);