]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix undefined offset warning when using '/' as external storage root 6946/head
authorRobin Appelman <robin@icewind.nl>
Tue, 19 Sep 2017 15:18:04 +0000 (17:18 +0200)
committerMorris Jobke <hey@morrisjobke.de>
Tue, 24 Oct 2017 23:45:25 +0000 (01:45 +0200)
Signed-off-by: Robin Appelman <robin@icewind.nl>
apps/files_external/lib/Lib/Api.php

index 82dd377cd1666e40f1c2c72ae981ab7869a5184d..6b10443bbdcabeec2014516af817b14c2d3abbac 100644 (file)
@@ -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);