Version 4.1.19.4
This commit is contained in:
1 parent
2bd5025018
commit
0dc2aee5ed
312 files changed
+53730
-32118
No files matched your search
+8
-3
@@ -4,12 +4,17 @@
|
||||
// the IDN extension is installed. This is a small Polyfill to declare
|
||||
// that method and use the php-punycode library so that IDNs can be
|
||||
// supported in all environments
|
||||
|
||||
require_once 'Punycode.php';
|
||||
|
||||
function idn_to_ascii( $string )
|
||||
{
|
||||
$punycode = new \TrueBV\Punycode;
|
||||
return $punycode->encode( $string );
|
||||
try
|
||||
{
|
||||
return $punycode->encode( $string );
|
||||
}
|
||||
catch ( \Exception $e )
|
||||
{
|
||||
return $string;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user