Welcome Guest, Not a member yet? Register   Sign In
[split] Bug in new form validation?
#23

(01-17-2018, 08:49 AM)Muzikant Wrote: I can confirm a bug. I am getting two errors, when I am validating an e-mail address.

Code:
A PHP Error was encountered
Severity: Notice
Message: Use of undefined constant INTL_IDNA_VARIANT_UTS46 - assumed 'INTL_IDNA_VARIANT_UTS46'
Filename: libraries/Form_validation.php
Line Number: 1235

Code:
A PHP Error was encountered
Severity: Warning
Message: idn_to_ascii() expects parameter 3 to be integer, string given
Filename: libraries/Form_validation.php
Line Number: 1235

libraries/Form_validation.php
PHP Code:
/*Line 1230*/ public function valid_email($str)
/*Line 1231*/ {
/*Line 1232*/   if (function_exists('idn_to_ascii') && preg_match('#\A([^@]+)@(.+)\z#'$str$matches))
/*Line 1233*/   {
/*Line 1234*/     $domain is_php('5.4')
/*Line 1235*/       idn_to_ascii($matches[2], 0INTL_IDNA_VARIANT_UTS46)
/*Line 1236*/       idn_to_ascii($matches[2]);
/*Line 1237*/     $str $matches[1].'@'.$domain;
/*Line 1238*/   }
/*Line 1239*/ 
/*Line 1240*/ 
  return (bool) filter_var($strFILTER_VALIDATE_EMAIL);
/*Line 1241*/ 

An errors occuring only on one of my webhostings, so the problem could be in server configuration (I tried four different companies, localhost if also fine).

they were hapened to me
Reply


Messages In This Thread
RE: [split] Bug in new form validation? - by Narf - 01-17-2018, 03:05 AM
RE: [split] Bug in new form validation? - by Kasrakh93 - 05-22-2018, 11:03 PM
RE: [split] Bug in new form validation? - by Narf - 01-17-2018, 12:11 PM
RE: [split] Bug in new form validation? - by Narf - 01-19-2018, 02:37 AM
RE: [split] Bug in new form validation? - by k_m - 03-18-2018, 05:38 AM
RE: [split] Bug in new form validation? - by Narf - 01-22-2018, 01:31 AM
RE: [split] Bug in new form validation? - by Narf - 02-14-2018, 11:22 AM
RE: [split] Bug in new form validation? - by Narf - 02-14-2018, 11:23 AM
RE: [split] Bug in new form validation? - by Leo - 05-08-2018, 12:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB