Skip to content

Commit 644dfd6

Browse files
authored
Merge pull request #2127 from RaspAP/fix/connection-lines
Fix: suppress stub connection line for unrecognized interface types
2 parents 554b590 + 3d62c2f commit 644dfd6

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

includes/dashboard.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,11 @@ function renderConnection(string $connectionType): string
156156
'tethering' => 'device-3',
157157
'cellular' => 'device-4'
158158
];
159-
$device = $deviceMap[$connectionType] ?? 'device-unknown';
159+
if (!isset($deviceMap[$connectionType])) {
160+
return 'app/img/solid.php';
161+
}
160162

161-
// return generated URL for solid.php
162-
return sprintf('app/img/solid.php?joint&%s&out', $device);
163+
return sprintf('app/img/solid.php?joint&%s&out', $deviceMap[$connectionType]);
163164
}
164165

165166
/**

0 commit comments

Comments
 (0)