• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[split] Bug in new form validation?

#21
I got the same error like these while sending email
Reply

#22
(01-17-2018, 03:30 PM)what do you think about using of code v.3.1.6 in this case ? Wrote: /that same in email.php library/

public function valid_email($str)
{
if (function_exists('idn_to_ascii') && preg_match('#\A([^@]+)@(.+)\z#', $str, $matches))
{
 if (defined('INTL_IDNA_VARIANT_UTS46'))
 {
  $domain = is_php('5.4')
  ? idn_to_ascii($matches[2], 0, INTL_IDNA_VARIANT_UTS46)
  : idn_to_ascii($matches[2]);
  $str = $matches[1].'@'.$domain; 
 } else {
  $str = $matches[1].'@'.idn_to_ascii($matches[2]); 
 }
}

return (bool) filter_var($str, FILTER_VALIDATE_EMAIL);
}
Reply

#23
Hello all, also getting
ERROR - 2018-05-08 22:07:39 --> Severity: 8192 --> idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated *clients server*/public_html/system/libraries/Form_validation.php 1236

When using PHP 7.2, this error prevented me from getting a correct response in JSON upon successful email sent condition....well I switched to 7.1 and everything works fine.
Reply

#24
(01-17-2018, 09: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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2018 MyBB Group.