diff --git a/api/src/Etemplate/Widget/Vfs.php b/api/src/Etemplate/Widget/Vfs.php index b302bf67b3..d07cad8e30 100644 --- a/api/src/Etemplate/Widget/Vfs.php +++ b/api/src/Etemplate/Widget/Vfs.php @@ -643,7 +643,7 @@ class Vfs extends File $files = []; } } - $response['total'] = $content['total'] ?? count($response['files']); + $response['total'] = $content['total'] ?? count($files); foreach($files as $path) { if(is_string($path) && $path == $content['path'] || is_array($path) && $path['path'] == $content['path'])