Merge pull request #1654 from buchwasa/phpstan-fixes

Fixes in func.php from phpstan
This commit is contained in:
DL6ER
2020-12-31 11:59:23 +01:00
committed by GitHub

View File

@@ -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);
@@ -390,7 +390,7 @@ function returnSuccess($message = "", $json = true)
if ($json) {
return [ "success" => true, "message" => $message ];
} else {
echo $msg."<br>";
echo $message."<br>";
return true;
}
}
@@ -400,7 +400,7 @@ function returnError($message = "", $json = true)
if ($json) {
return [ "success" => false, "message" => $message ];
} else {
echo $msg."<br>";
echo $message."<br>";
return false;
}
}