Fatal Error Triggered with PHP 8.0.13 (or Higher)


We’re using both Gravity Forms 2.5.15 and gAppointments 1.9.6 for Gravity Forms to schedule appointments. As of today, these are the latest plugin versions.


When using PHP 7.4.26 everything works fine. However, when we switch to PHP 8.0.13 (or higher) our Gravity Form ceases to work. That is, when we fill out the form (including setting up an appointment), and click the “Send” button, we get a spinning circle next to the “Send” button. It just hangs and the form is never processed.


(1) Upon inspecting the affected website page, we noticed the following message:

Failed to load resource: the server responded with a status of 500 ()

(2) Upon inspecting our debug log, we noticed the following message:

[26-Nov-2021 20:10:57 UTC] PHP Fatal error:  Uncaught TypeError: explode(): Argument #2 ($string) must be of type string, array given in /home/customer/www/mywebsite.com/public_html/wp-content/plugins/gravityforms/common.php:3291

Stack trace:

#0 /home/customer/www/mywebsite..com/public_html/wp-content/plugins/gravityforms/common.php(3291): explode('|', Array)
#1 /home/customer/www/mywebsite..com/public_html/wp-content/plugins/gravityforms/forms_model.php(3482): GFCommon::get_selection_value(Array)
#2 /home/customer/www/mywebsite..com/public_html/wp-content/plugins/gravityforms/forms_model.php(7745): GFFormsModel::is_value_match(Array, '', 'isnot', Object(GF_Appointment_Booking_Calendar), Array, Array)
#3 /home/customer/www/mywebsite..com/public_html/wp-content/plugins/gravityforms/forms_model.php(3606): GFFormsModel::evaluate_conditional_logic(Array, Array, Array, NULL)
#4 /home/customer/www/mywebsite..com/public_html/wp-content/plugins/gravityforms/forms_model.php(3373): GFFormsModel::get_field_display(Array, Object(GF_Field_PayPal), Array, NULL)
#5 /home/customer/www/mywebsite..com/public_html/wp-content/plugins/gravityforms/forms_model.php(3203): GFFormsModel::is_field_hidden(Array, Object(GF_Field_PayPal), Array)
#6 /home/customer/www/mywebsite..com/public_html/wp-content/plugins/gravityforms/forms_model.php(6663): GFFormsModel::create_lead(Array)
#7 /home/customer/www/mywebsite..com/public_html/wp-content/plugins/gravityforms/form_display.php(293): GFFormsModel::get_current_lead()
#8 /home/customer/www/mywebsite..com/public_html/wp-content/plugins/gravityforms/form_display.php(34): GFFormDisplay::maybe_add_review_page(Array)
#9 /home/customer/www/mywebsite..com/public_html/wp-content/plugins/gravityforms/gravityforms.php(799): GFFormDisplay::process_form(16)
#10 /home/customer/www/mywebsite..com/public_html/wp-includes/class-wp-hook.php(303): GFForms::maybe_process_form(Object(WP))
#11 /home/customer/www/mywebsite..com/public_html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array)
#12 /home/customer/www/mywebsite..com/public_html/wp-includes/plugin.php(518): WP_Hook->do_action(Array)
#13 /home/customer/www/mywebsite..com/public_html/wp-includes/class-wp.php(763): do_action_ref_array('wp', Array)
#14 /home/customer/www/mywebsite..com/public_html/wp-includes/functions.php(1291): WP->main('')
#15 /home/customer/www/mywebsite..com/public_html/wp-blog-header.php(16): wp()
#16 /home/customer/www/mywebsite..com/public_html/index.php(17): require('/home/customer/...')
#17 {main} thrown in /home/customer/www/mywebsite..com/public_html/wp-content/plugins/gravityforms/common.php on line 3291


We reached out to gAppointments customer support and they claim their plugin code is compliant with PHP 8.0.X.

So, it appears the above is being caused by a compatibility issue between Gravity Forms and PHP 8.0.13 (and higher).

Anybody out there that can further troubleshoot and fix this?

Thanks in advance for your help!


If the fix ends up being an update to a Gravity Forms file (e.g., common.php), it would be great if the Gravity Forms DevOps Team can also update their related article concerning GF and PHP 8. Thank you!


We conducted additional testing and can confirm the issue is with gAppointments.

Here’s what we did: (with PHP 8.0.13 activated)

(1) Disabled all plugins (including gAppointments), except Gravity Forms.

Result: No issues. Gravity Form processed normally. Nothing recorded in our Debug Log.

(2) Disabled all plugins, except gAppointments and Gravity Forms.

Result: Gravity Form did not process. This happend only when we selected a Date and Time using gAppointments calendar/scheduling fields. Our Debug Log recorded the message provided above.

Based on the above, we’ve contacted the developers of gAppointments once again to report this issue.

Once we hear back from the developers of gAppointments (with a fix), we’ll report it here if this topic has not been closed.

Apologies for any inconvience caused.



Thank you for the update. I’ll leave this open so you can post the resolution once it’s been addressed. Thank you for digging in.

1 Like


We are still waiting for the developers of gAppointments to get back to us. As soon as they do (with a fix), we’ll post it here.

Thank you!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.