mirror of
https://github.com/unraid/webgui.git
synced 2026-05-03 00:09:27 -05:00
Fix php error when shell_exec() returns a null value.
This commit is contained in:
@@ -104,7 +104,7 @@ while (true) {
|
||||
$valid_paths = array_filter($paths, function($key) {
|
||||
$mnt_path = '/mnt/' . $key;
|
||||
/* Check if the directory exists and is a valid mount point */
|
||||
return is_dir($mnt_path) && trim(shell_exec("mountpoint -q " . escapeshellarg($mnt_path) . " && echo 1")) === '1';
|
||||
return is_dir($mnt_path) && trim((shell_exec("mountpoint -q " . escapeshellarg($mnt_path) . " && echo 1")) ?? '') === '1';
|
||||
});
|
||||
|
||||
/* Construct the list of paths */
|
||||
|
||||
Reference in New Issue
Block a user