mirror of
https://github.com/pi-hole/web.git
synced 2026-04-24 18:59:48 +01:00
Only use IDN subroutines when the module is available. We have seen reports that at least DietPi is having issues with not matching PHP base and extension versions.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -22,7 +22,8 @@ $comment = trim($_POST['comment']);
|
||||
|
||||
// Convert domain name to IDNA ASCII form for international domains
|
||||
// Do this only for exact domains, not for regex filters
|
||||
if ($list === "white" || $list === "black") {
|
||||
// Only do it when the php-intl extension is available
|
||||
if (extension_loaded("intl") && ($list === "white" || $list === "black")) {
|
||||
foreach($domains as &$domain)
|
||||
{
|
||||
$domain = idn_to_ascii($domain);
|
||||
|
||||
Reference in New Issue
Block a user