Set locale for utf-8 support, remove mb_escapeshellarg (deprecated)

This commit is contained in:
billz
2021-05-02 07:02:30 +01:00
parent 6bfb3a3c9d
commit 90aea4ca93
2 changed files with 2 additions and 14 deletions

View File

@@ -518,19 +518,6 @@ function cache($key, $callback)
}
}
// insspired by
// http://markushedlund.com/dev/php-escapeshellarg-with-unicodeutf-8-support
function mb_escapeshellarg($arg)
{
$isWindows = strtolower(substr(PHP_OS, 0, 3)) === 'win';
if ($isWindows) {
$escaped_arg = str_replace(array('"', '%'), '', $arg);
} else {
$escaped_arg = str_replace("'", "'\\''", $arg);
}
return "\"$escaped_arg\"";
}
function dnsServers()
{
$data = json_decode(file_get_contents("./config/dns-servers.json"));