Description
In the file manager, a PHP Warning is triggered because the variable $len is not initialized before being passed to the compact() function. This is especially problematic on PHP 8.x.
Location
File: [manager/actions/files.dynamic.php]
Line: 472 (call to compact)
Proposed Fix
Initialize $len before the condition:
+ $len = 0;
if (strlen(MODX_BASE_PATH) < strlen($filemanager_path)) {
$len--;
}
...
- extract(ls($startpath, compact('len', ...