Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update FreeBSD.php
fix syntax

Signed-off-by: Joachim Boerner <[email protected]>
  • Loading branch information
tflidd committed Apr 2, 2022
commit 2e7beae937b4c70af44f604b540f2797b0d127e0
4 changes: 2 additions & 2 deletions lib/OperatingSystems/FreeBSD.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ public function getNetworkInfo(): array {
$result['dns'] = $alldns;
$netstat = $this->executeCommand('netstat -rn');
preg_match_all("/(?<=^default)\s*[0-9a-fA-f\.:]+/m", $netstat, $gw);
if (count($gw[0]) > 0){
$result['gateway'] = implode(array_map("trim", $gw[0]), ", ");
if (count($gw[0]) > 0) {
$result['gateway'] = implode(", ", array_map("trim", $gw[0]));
}
} catch (\RuntimeException $e) {
return $result;
Expand Down