Fatal error when disabling a Jetpack Form integration
-
Issue:
The hCaptcha plugin throws a fatal error when saving a toggled-off Jetpack Form on the
hcaptcha-integrationspage.The fatal is below:
Error Details
=============
An error of type E_ERROR was caused in line 949 of the file /srv/htdocs/wp-content/plugins/hcaptcha-for-forms-and-more/src/php/Settings/Abstracts/SettingsBase.php. Error message: Uncaught TypeError: KAGG\Settings\Abstracts\SettingsBase::sanitize_option_callback(): Return value must be of type array, null returned in /srv/htdocs/wp-content/plugins/hcaptcha-for-forms-and-more/src/php/Settings/Abstracts/SettingsBase.php:949
Stack trace:
#0 /wordpress/core/6.8.2/wp-includes/class-wp-hook.php(326): KAGG\Settings\Abstracts\SettingsBase->sanitize_option_callback(NULL)
#1 /wordpress/core/6.8.2/wp-includes/plugin.php(205): WP_Hook->apply_filters(NULL, Array)
#2 /wordpress/core/6.8.2/wp-includes/formatting.php(5119): apply_filters('sanitize_option...', NULL, 'hcaptcha_settin...', NULL)
#3 /wordpress/core/6.8.2/wp-includes/option.php(887): sanitize_option('hcaptcha_settin...', NULL)
#4 /wordpress/core/6.8.2/wp-admin/options.php(344): update_option('hcaptcha_settin...', NULL)
#5 {main}
thrownSteps to Recreate:
- Start with a brand new site with Twenty-Twenty Five, hCaptcha for WP, and Jetpack. My testing setup also has Akismet and Jetpack Protect. The versions I am using are:
- Akismet – Version 5.5
- hCaptcha for WP – Version 4.16.0
- Jetpack – Version 15.0-a.5 (this is managed by my host, Pressable. You may find this version in the plugin directory here)
- Jetpack Protect – Version 4.3.0
- Create a new Jetpack form under Jetpack -> Forms. Save the form and publish it.
- Setup hCaptcha for WP and test that all works as intended.
- Go to the Integrations page, toggle on hCaptcha for your Jetpack Form, and save.
- Toggle off the Jetpack Form and save.
- Observe the above PHP fatal error.
This video also shows the fatal only occurs when trying to toggle the Jetpack Form off: https://d.pr/v/vz3oDw
Thank you for looking into this and do let me know if I can help test anything further!
- Start with a brand new site with Twenty-Twenty Five, hCaptcha for WP, and Jetpack. My testing setup also has Akismet and Jetpack Protect. The versions I am using are:
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
You must be logged in to reply to this topic.