Fix fatal error in CLI scripts in PHP 8.4 #2513

This commit is contained in:
Kijin Sung 2025-03-05 18:48:34 +09:00
parent 5656189a19
commit fed2af3d13
2 changed files with 8 additions and 3 deletions

View file

@ -258,7 +258,12 @@ class URL
$position = 0;
}
if (function_exists('idn_to_utf8'))
$domain = (string)$domain;
if ($domain === '')
{
$new_domain = '';
}
elseif (function_exists('idn_to_utf8'))
{
$new_domain = idn_to_utf8($domain);
}