Fix PHP Warning: Use of undefined constant INTL_IDNA_VARIANT_UTS46 on servers without php-intl extension

pull/6465/head
Aleksander Machniak 7 years ago
parent a315f2b16d
commit cdf7a88b3e

@ -879,7 +879,7 @@ class rcube_utils
// Note that in PHP 7.2/7.3 calling idn_to_* functions with default arguments
// throws a warning, so we have to set the variant explicitely (#6075)
$variant = INTL_IDNA_VARIANT_UTS46;
$variant = defined('INTL_IDNA_VARIANT_UTS46') ? INTL_IDNA_VARIANT_UTS46 : null;
$options = 0;
if ($is_utf) {

Loading…
Cancel
Save