Contact form - PHP 7 - Not Working

Latest Reply from Dave at 2017-08-21 10:56:45 Solution
Hello,

I have bought and use AutoBlog on all of our sites. After upgrading to PHP 7 the Contact form doesn't work. Switching to PHP 5.6 it works again. Please provide a fix, to work on PHP 7.

Thanks
Hi!

Please, find the line:

if ($detail['regex']!=''&&!eregi(stripslashes($detail['regex']),$form[$key])) {

inside the file public_html/wp-content/themes/autoblog-2-4-3/feedback.php and replace it with:

 if ($detail['regex']!=''&&!preg_match('/'.stripslashes($detail['regex']).'/',$form[$key])) { 


That function has been deprecated and must be replaced with this new one.

Leave a reply

Add codeAdd image