• Resolved xwolf

    (@xwolf)


    The plugin doenst work anymore wth PHP version 8.0

    Log says:

    2022-11-08 15:46:30.206528] [error]: Got error 'PHP message: PHP Fatal error: Uncaught Error: Undefined constant "WPCF7_VERSION" in /.../websource/wp-content/plugins/cf7-conditional-fields/admin.php:227\nStack trace:\n#0 /.../websource/wp-includes/class-wp-hook.php(308): CF7CF->{closure}()\n#1 /..../websource/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()\n#2 /.../websource/wp-includes/plugin.php(517): WP_Hook->do_action()\n#3 /.../websource/wp-admin/admin-header.php(303): do_action()\n#4 /.../websource/wp-admin/index.php(137): require_once('...')\n#5 {main}\n thrown in /.../websource/wp-content/plugins/cf7-conditional-fields/admin.php on line 227'

    The error promps on the dashboard of the website.

    Best regards
    Wolfgang

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jules Colle

    (@jules-colle)

    It’s working with PHP 8 here. The error seems to indicates that you haven’t activated the contact form 7 plugin.

    Thread Starter xwolf

    (@xwolf)

    You are right.
    We just found out, the website user first activated cf7, then cf7 conditonal fields. But after that, someone deactivated cf7.

    But it would be better, if cf7 conditional fields would not call a fatal error then.

    To avaoid this in line 215 (admin.php) you wrote:

    if (!defined('WPCF7_VERSION') && empty($settings['notice_dismissed_'.$nid])) {

    In this cause WPCF7_VERSION is undefined, therefor this matches true, but empty($settings[‘notice_dismissed_’.$nid]) is false. Therfor the plugin doesnt exit here.

    Best regards
    Wolfgang Wiese

    Plugin Author Jules Colle

    (@jules-colle)

    Seems like something I should fix indeed. Thanks for bringing this to my attention.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP Fatal error on PHP 8.0’ is closed to new replies.