Browse Source

Remove checks for intl functionality

Visman 4 years ago
parent
commit
9bbc27b95f
2 changed files with 5 additions and 10 deletions
  1. 4 6
      app/Core/File.php
  2. 1 4
      app/Core/Mail.php

+ 4 - 6
app/Core/File.php

@@ -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), '-');
 

+ 1 - 4
app/Core/Mail.php

@@ -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);
             }