Filemanager: Fix "[] operator not supported for strings"

again
This commit is contained in:
nathan 2023-06-08 13:58:46 -06:00
parent 9b46880528
commit 2ed1513e7b

View File

@ -1019,11 +1019,11 @@ class filemanager_ui
if($query['col_filter']['path'] && $vfs_options['name']) if($query['col_filter']['path'] && $vfs_options['name'])
{ {
// Query the requested path, in case it's nested // Query the requested path, in case it's nested
$query['col_filter']['path'][] = $query['path'];
if(!is_array($query['col_filter']['dir'])) if(!is_array($query['col_filter']['dir']))
{ {
$query['col_filter']['dir'] = $query['col_filter']['dir'] ? [$query['col_filter']['dir']] : []; $query['col_filter']['dir'] = $query['col_filter']['dir'] ? [$query['col_filter']['dir']] : [];
} }
$query['col_filter']['path'][] = $query['path'];
foreach($query['col_filter']['path'] as $filter_path) foreach($query['col_filter']['path'] as $filter_path)
{ {
$query['col_filter']['dir'][] = Vfs::is_dir($filter_path) ? $filter_path : Vfs::dirname($filter_path); $query['col_filter']['dir'][] = Vfs::is_dir($filter_path) ? $filter_path : Vfs::dirname($filter_path);