Remove checks for intl functionality
This commit is contained in:
parent
9575efce44
commit
9bbc27b95f
2 changed files with 5 additions and 10 deletions
|
@ -107,12 +107,10 @@ class File
|
|||
*/
|
||||
protected function filterName(string $name): string
|
||||
{
|
||||
if (\function_exists('\\transliterator_transliterate')) {
|
||||
$name = \transliterator_transliterate(
|
||||
"Any-Latin; NFD; [:Nonspacing Mark:] Remove; NFC; [:Punctuation:] Remove; Lower();",
|
||||
$name
|
||||
);
|
||||
}
|
||||
$name = \transliterator_transliterate(
|
||||
"Any-Latin; NFD; [:Nonspacing Mark:] Remove; NFC; [:Punctuation:] Remove; Lower();",
|
||||
$name
|
||||
);
|
||||
|
||||
$name = \trim(\preg_replace('%[^\w.-]+%', '-', $name), '-');
|
||||
|
||||
|
|
|
@ -148,10 +148,7 @@ class Mail
|
|||
$ip = null;
|
||||
$domainASCII = $domain = \mb_strtolower($domain, 'UTF-8');
|
||||
|
||||
if (
|
||||
\preg_match('%[\x80-\xFF]%', $domain)
|
||||
&& \function_exists('\\idn_to_ascii')
|
||||
) {
|
||||
if (\preg_match('%[\x80-\xFF]%', $domain)) {
|
||||
$domainASCII = \idn_to_ascii($domain, 0, \INTL_IDNA_VARIANT_UTS46);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue