Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Codeigniter 3.1.7 valid_email issue

I have two sites using Codeigniter. Today I have updated sites to Codeigniter 3.1.7 (from 3.1.6). After that at one of this sites email validation had broken, valid_email validation rule doesn't work any more. On second site all fine. I had check out error logs and found error:

ERROR - 2018-02-06 10:13:21 --> Severity: Warning --> idn_to_ascii() expects parameter 3 to be long, string given /public_html/system/libraries/Form_validation.php 1235

Codeigniter's changlog says:

Updated Form Validation Library rule valid_email to use INTL_IDNA_VARIANT_UTS46 for non-ASCII domain names.

It seems to me that INTL_IDNA_VARIANT_UTS46 constant is not defined. Site using PHP Version 5.6.30

How can I fix this issue?

like image 872
Evgeny Avatar asked Feb 06 '18 09:02

Evgeny


1 Answers

I found discussion of this problem here.

Issue is outdated ICU library (ICU version 4.2.1 was installed)

like image 72
Evgeny Avatar answered Sep 20 '22 04:09

Evgeny