Minor fix
This commit is contained in:
parent
44c08b76f9
commit
64e3b77eae
File diff suppressed because it is too large
Load Diff
|
|
@ -197,13 +197,14 @@ class MediaManager extends WidgetBase
|
|||
protected function splitPathToSegments($path)
|
||||
{
|
||||
$path = MediaLibrary::validatePath($path, true);
|
||||
$result = [];
|
||||
|
||||
do {
|
||||
$result[] = $path;
|
||||
} while (($path = dirname($path)) != '/');
|
||||
$path = ltrim($path, '/');
|
||||
|
||||
return array_reverse($result);
|
||||
$result = explode('/', $path);
|
||||
if (count($result) == 1 && $result[0] == '')
|
||||
$result = [];
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue