mirror of
https://github.com/pi-hole/web.git
synced 2026-04-24 10:50:23 +01:00
Fixes in func.php from phpstan
Signed-off-by: buchwasa <17461354+buchwasa@users.noreply.github.com>
This commit is contained in:
@@ -164,7 +164,7 @@ function addCustomDNSEntry($ip="", $domain="", $json=true)
|
||||
}
|
||||
catch (\Exception $ex)
|
||||
{
|
||||
return error($ex->getMessage(), $json);
|
||||
return returnError($ex->getMessage(), $json);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ function deleteAllCustomDNSEntries()
|
||||
}
|
||||
catch (\Exception $ex)
|
||||
{
|
||||
return errorJsonResponse($ex->getMessage());
|
||||
return returnError($ex->getMessage());
|
||||
}
|
||||
|
||||
fclose($handle);
|
||||
@@ -387,7 +387,7 @@ function returnSuccess($message = "", $json = true)
|
||||
if ($json) {
|
||||
return [ "success" => true, "message" => $message ];
|
||||
} else {
|
||||
echo $msg."<br>";
|
||||
echo $message."<br>";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -397,7 +397,7 @@ function returnError($message = "", $json = true)
|
||||
if ($json) {
|
||||
return [ "success" => false, "message" => $message ];
|
||||
} else {
|
||||
echo $msg."<br>";
|
||||
echo $message."<br>";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user