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

pull/6085/head
Aleksander Machniak 7 years ago
parent 46e2e7e16c
commit 3488531b26

@ -894,7 +894,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