Fix undefined offset warning when using '/' as external storage root

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2017-09-19 17:18:04 +02:00 committed by Morris Jobke
parent 895336a3f3
commit f301b12c7b
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ class Api {
private static function formatMount($mountPoint, $mountConfig) { private static function formatMount($mountPoint, $mountConfig) {
// strip "/$user/files" from mount point // strip "/$user/files" from mount point
$mountPoint = explode('/', trim($mountPoint, '/'), 3); $mountPoint = explode('/', trim($mountPoint, '/'), 3);
$mountPoint = $mountPoint[2]; $mountPoint = isset($mountPoint[2]) ? $mountPoint[2] : '';
// split path from mount point // split path from mount point
$path = dirname($mountPoint); $path = dirname($mountPoint);