• Resolved Conwell

    (@alexconwell)


    Since v4.6 Contact Form 7 class WPCF7_Shortcode is deprecated
    please change line 70
    $tags = new WPCF7_Shortcode( $tags );
    to
    $tags = new WPCF7_FormTag( $tags );

    Since php 7.0 “eregi” removed
    please change line 55
    $expression = "^[a-z\'0-9]+([._-][a-z\'0-9]+)*@([a-z0-9]+([._-][a-z0-9]+))+$";
    to
    $expression = "/^[a-z\'0-9]+([._-][a-z\'0-9]+)*@([a-z0-9]+([._-][a-z0-9]+))+$/i";
    and line 57
    if (eregi($expression, $emailAddress)) {
    to
    if (preg_match($expression, $emailAddress)) {

Viewing 1 replies (of 1 total)
  • +1. Here’s more info from WP debug log:

    PHP Fatal error:  Uncaught Error: Call to undefined function eregi() in [WPDIR]/wp-content/plugins/email-domain-verification-in-cf7/contact-form-7-email-validation-check.php:57
    Stack trace:
    #0 [WPDIR]/wp-content/plugins/email-domain-verification-in-cf7/contact-form-7-email-validation-check.php(79): wpcf7_validate_email_check('[email protected]')
    #1 [WPDIR]/wp-includes/class-wp-hook.php(298): wpcf7_custom_email_validation_filter(Object(WPCF7_Validation), Object(WPCF7_Shortcode))
    #2 [WPDIR]/wp-includes/plugin.php(203): WP_Hook->apply_filters(Object(WPCF7_Validation), Array)
    #3 [WPDIR]/wp-content/plugins/contact-form-7/includes/submission.php(195): apply_filters('wpcf7_validate_...', Object(WPCF7_Validation), Array)
    #4 [WPDIR]/wp-content/plugins/contact-form-7/includes/submission.php(145): WPCF7_Submission->validate()
    #5 [WPDIR]/wp-content/plugins/contact-form-7/inclu in [WPDIR]/wp-content/plugins/email-domain-verification-in-cf7/contact-form-7-email-validation-check.php on line 57
Viewing 1 replies (of 1 total)
  • The topic ‘Change eregi and WPCF7_Shortcode’ is closed to new replies.