Fix php error when shell_exec() returns a null value.

This commit is contained in:
dlandon
2025-02-11 11:22:37 -06:00
parent 9d4f24629f
commit 1278040495
+1 -1
View File
@@ -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 */