WordPress.org

Ready to get started?Download WordPress

Forums

Fatal Error in 7.1.9.3 on line 454 of wp-contact-form-7.php on new installation (2 posts)

  1. donthorp
    Member
    Posted 5 years ago #

    After installing the plugin on a new site, I received the following error when accessing the admin page.


    Fatal error: Cannot use string offset as an array in /[My Plugin Path]/contact-form-7/wp-contact-form-7.php on line 454

    I fixed the problem with the following patch to function management_page()

    Replace starting on Line 715

    } else {
    $current = (int) array_shift(array_keys($contact_forms));
    $cf = stripslashes_deep($contact_forms[$current]);
    $cf = $this->upgrade($cf);
    }

    With

    } else {
    $current = (int) array_shift(array_keys($contact_forms));
    $cf = stripslashes_deep($contact_forms[$current]);
    if ($cf != "") // handle empy form
    $cf = $this->upgrade($cf);
    }

  2. Takayuki Miyoshi
    Member
    Posted 5 years ago #

    Thank you. I'll check it.

Topic Closed

This topic has been closed to new replies.

About this Topic