Fatal error on send mail from contact form

Modern, responsive, unique and elegant one-page WordPress theme to showcase your creativity
GK User
Tue Oct 03, 2017 2:19 pm
Fatal error: Uncaught Error: Call to undefined function eregi() in /var/www/vhosts/mydomain.it/subdomains/toast/httpdocs/wp-content/themes/Creativity/layouts/gkcontact.php:33 Stack trace: #0 /var/www/vhosts/mydomain.it/subdomains/toast/httpdocs/wp-content/themes/Creativity/gavern/helpers/helpers.layout.php(33): include() #1 /var/www/vhosts/mydomain.it/subdomains/toast/httpdocs/wp-content/themes/Creativity/layouts/header.php(147): gk_load('gkcontact') #2 /var/www/vhosts/mydomain.it/subdomains/toast/httpdocs/wp-content/themes/Creativity/gavern/helpers/helpers.layout.php(33): include('/var/www/vhosts...') #3 /var/www/vhosts/mydomain.it/subdomains/toast/httpdocs/wp-content/themes/Creativity/index.php(15): gk_load('header') #4 /var/www/vhosts/mydomain.it/subdomains/toast/httpdocs/wp-includes/template-loader.php(74): include('/var/www/vhosts...') #5 /var/www/vhosts/mydomain.it/subdomains/toast/httpdocs/wp-blog-header.php(19): require_once('/var/www/vhosts...' in /var/www/vhosts/mydomain.it/subdomains/toast/httpdocs/wp-content/themes/Creativity/layouts/gkcontact.php on line 33
User avatar
Expert Boarder

GK User
Tue Oct 03, 2017 2:48 pm
User avatar
Expert Boarder

Joshua M
Wed Oct 04, 2017 8:32 am
Please edit your Creativity/template.contact.php file and change this fragment:
Code: Select all
if(trim($_POST['email']) === '' || !eregi("^[A-Z0-9._%-][email protected][A-Z0-9._%-]+\.[A-Z]{2,4}$", trim($_POST['email']))) {

into:
Code: Select all
$regex = '/([a-z0-9_]+|[a-z0-9_]+\.[a-z0-9_]+)@(([a-z0-9]|[a-z0-9]+\.[a-z0-9]+)+\.([a-z]{2,4}))/i';
        if(trim($_POST['email']) === '' || !preg_match($regex, trim($_POST['email']))) {
User avatar
Moderator

GK User
Wed Oct 04, 2017 9:23 am
Joshua M wrote:Please edit your Creativity/template.contact.php file and change this fragment:
Code: Select all
if(trim($_POST['email']) === '' || !eregi("^[A-Z0-9._%-][email protected][A-Z0-9._%-]+\.[A-Z]{2,4}$", trim($_POST['email']))) {

into:
Code: Select all
$regex = '/([a-z0-9_]+|[a-z0-9_]+\.[a-z0-9_]+)@(([a-z0-9]|[a-z0-9]+\.[a-z0-9]+)+\.([a-z]{2,4}))/i';
        if(trim($_POST['email']) === '' || !preg_match($regex, trim($_POST['email']))) {

Don't work
User avatar
Expert Boarder


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.