Version 4.6.0
This commit is contained in:
1 parent
f79dcf067a
commit
517a5e1f70
2036 files changed
+110041
-26162
No files matched your search
+15
-2
@@ -4,8 +4,21 @@
|
||||
// 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
|
||||
|
||||
function idn_to_ascii( $string )
|
||||
|
||||
// Punycode does not support setting flags or variants, but we specify them as parameters for compatability with the PECL function.
|
||||
// @see <a href='https://www.php.net/manual/en/function.idn-to-ascii'>PHP Documentation</a>
|
||||
|
||||
if ( !\defined( 'IDNA_NONTRANSITIONAL_TO_ASCII' ) )
|
||||
{
|
||||
\define( 'IDNA_NONTRANSITIONAL_TO_ASCII', 16 );
|
||||
}
|
||||
|
||||
if ( !\defined( 'INTL_IDNA_VARIANT_UTS46' ) )
|
||||
{
|
||||
\define( 'INTL_IDNA_VARIANT_UTS46', 1 );
|
||||
}
|
||||
|
||||
function idn_to_ascii( $string, $flags = 0, $variant = 1, &$idna_info = null )
|
||||
{
|
||||
$punycode = new \TrueBV\Punycode;
|
||||
try
|
||||
|
||||
Reference in new issue
Block a user