Fix undefined variable when setting DNS servers

This commit is contained in:
Mcat12
2017-03-21 18:35:32 -04:00
committed by GitHub
parent f6a8fd1c74
commit c182834e55

View File

@@ -228,7 +228,7 @@ function isinserverlist($addr) {
if(!strlen($error))
{
$IPs = implode (",", $DNSservers);
exec("sudo pihole -a setdns ".$IPs." ".$extra);
$return = exec("sudo pihole -a setdns ".$IPs." ".$extra);
$success .= htmlspecialchars($return)."<br>";
$success .= "The DNS settings have been updated (using ".count($DNSservers)." DNS servers)";
}