Title: PHP Fatal error on PHP 8.0
Last modified: November 8, 2022

---

# PHP Fatal error on PHP 8.0

 *  Resolved [xwolf](https://wordpress.org/support/users/xwolf/)
 * (@xwolf)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/php-fatal-error-on-php-8-0/)
 * 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](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/php-fatal-error-on-php-8-0/#post-16177728)
 * 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](https://wordpress.org/support/users/xwolf/)
 * (@xwolf)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/php-fatal-error-on-php-8-0/#post-16177812)
 * 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](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/php-fatal-error-on-php-8-0/#post-16180362)
 * 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.

 * ![](https://ps.w.org/cf7-conditional-fields/assets/icon-256x256.png?rev=2072595)
 * [Conditional Fields for Contact Form 7](https://wordpress.org/plugins/cf7-conditional-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cf7-conditional-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cf7-conditional-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/cf7-conditional-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cf7-conditional-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cf7-conditional-fields/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/php-fatal-error-on-php-8-0/#post-16180362)
 * Status: resolved