Incompatibility issue leading to PHP Fatal error
-
Hi,
I think I found an incompatibility issue between “Send PDF for Contact Form 7” and other plugins causing following error:PHP Fatal error: Uncaught Error: Cannot use object of type WP_Post as array in /wp-content/plugins/send-pdf-for-contact-form-7/classes/send-pdf.php:928
Stack trace:
#0 /wp-includes/class-wp-hook.php(287): cf7_sendpdf->wpcf7pdf_mail_components(Array, Object(WPCF7_ContactForm), Object(WPCF7_Mail))
#1 /wp-includes/plugin.php(212): WP_Hook->apply_filters(Array, Array)
#2 /wp-content/plugins/contact-form-7/includes/mail.php(107): apply_filters(‘wpcf7_mail_comp…’, Array, Object(WPCF7_ContactForm), Object(WPCF7_Mail))
#3 /wp-content/plugins/contact-form-7/includes/mail.php(19): WPCF7_Mail->compose()
#4 /wp-content/plugins/contact-form-7/includes/submission.php(483): WPCF7_Mail::send(Array, ‘mail_2’)
#5 /wp-content/plugins/send-pdf-for-contact-form-7/classes/send-pdf.php on line 928To replicate the issue please install following plugins:
1. Contact form 7
2. Send PDF for Contact Form 7
3. Yoast SEO ( https://it.www.ads-software.com/plugins/wordpress-seo/ )
4. Post SMTP ( https://it.www.ads-software.com/plugins/post-smtp/ )Then configure post SMTP and create a CF7 form using “Mail (2)” functionality.
Now, if you submit the form the spinning icon will keep on spinning and you will not get the “Mail sent” notice, moreover and you will find above error in server log.
The issue goes away if you disable “Send PDF for Contact Form 7” plugin, or disable “Mail (2)” functionality in CF7 form, or downgrade “Yoast Seo” to version 15.7, or disable it, or disable “Post SMTP”.
I tried this on a fresh WP install with Twenty Twenty-One theme and no other plugins active except the ones listed above.
WP and all plugins are up to date.
- The topic ‘Incompatibility issue leading to PHP Fatal error’ is closed to new replies.