Skip to content

Commit

Permalink
Remove unnecessary else case
Browse files Browse the repository at this point in the history
Signed-off-by: Christian König <[email protected]>
  • Loading branch information
yubiuser committed Jun 6, 2022
1 parent d99fc93 commit a4ebb5b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,8 @@
// get the gateway address for the default route on the Pi-hole interface
if ($piHoleInterface !== "unknown") {
$IPv4GW=shell_exec("ip -4 route | grep default | grep '${piHoleInterface}' | cut -d ' ' -f 3");
} else {
$IPv4GW = "unknown";
}
// if the route did not return anything
// if the route did not return anything or $piHoleInterface is unknown
if (empty($IPv4GW)) {
$IPv4GW = "unknown";
}
Expand Down

0 comments on commit a4ebb5b

Please sign in to comment.