Title: PHP Errors with Contact Form
Last modified: April 4, 2023

---

# PHP Errors with Contact Form

 *  Resolved Anonymous User
 * (@anonymized-20831043)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/php-errors-with-contact-form/)
 * When submitting a contact form, the following error messsages are generated everytime:
 * _[03-Apr-2023 21:25:28 UTC] PHP Warning: Undefined array key 1 in /home4/…/public\
   _html/wp-content/plugins/wpforms-lite/includes/fields/class-gdpr-checkbox.php
   on line 304
   [03-Apr-2023 21:25:28 UTC] PHP Warning: Trying to access array offset
   on value of type null in /home4/…/public\_html/wp-content/plugins/wpforms-lite/
   includes/fields/class-gdpr-checkbox.php on line 304
 * This is the basic contact form only modified to have the simple name field rather
   than first and last name. If I uncheck the GDPR box, the error goes away.
 * All plugins and WP are up to date. This has been ongoing for some time through
   different versions of this plugin and WP.
 * Suggestions?

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [Prashant Rai](https://wordpress.org/support/users/prashantrai/)
 * (@prashantrai)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/php-errors-with-contact-form/#post-16630912)
 * Hey @darrylbosch – Thanks for reaching out!
 * When you have sometime, can you please try the steps described in our detailed
   guide on [how to test for plugin/theme conflicts](https://wpforms.com/docs/how-to-test-for-theme-or-plugin-conflicts)
   and see if that helps?
 * Kindly,
 *  [Nik Sebastian](https://wordpress.org/support/users/niksebastian/)
 * (@niksebastian)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/php-errors-with-contact-form/#post-16630921)
 * Hi @darrylbosch – Sorry to hear about the trouble you are facing here! 
   When 
   you get the chance, would you mind sharing the form URL with us so that we can
   take a closer look?
 * Thanks,
    -  This reply was modified 3 years, 2 months ago by [Nik Sebastian](https://wordpress.org/support/users/niksebastian/).
 *  Thread Starter Anonymous User
 * (@anonymized-20831043)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/php-errors-with-contact-form/#post-16631331)
 * Hi [@prashantrai](https://wordpress.org/support/users/prashantrai/). I followed
   the advice in your link but the error persists. I deactivated all plugins, completed
   the form, and the same error is generated. I switched from OceanWP theme to Twenty
   Twenty-Two theme and the same error is generated.
 * Hi [@niksebastian](https://wordpress.org/support/users/niksebastian/), this site
   is under development and contains proprietary information that is not ready for
   public viewing yet, so I am unable to share the URL publicly. Thanks for your
   offer, though.
 *  [Prashant Rai](https://wordpress.org/support/users/prashantrai/)
 * (@prashantrai)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/php-errors-with-contact-form/#post-16637079)
 * Hey @darrylbosch – Thanks for following on this ticket!
 * Looking at the error message, it seems to be related to the GDPR field. When 
   you have sometime, can you please check and let me know if you’ve enabled GDPR
   field on the form?
 * Kindly,
 *  Thread Starter Anonymous User
 * (@anonymized-20831043)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/php-errors-with-contact-form/#post-16637345)
 * Hello again, [@prashantrai](https://wordpress.org/support/users/prashantrai/).
 * Yes, I do have GDPR enabled.
 * I actually found a solution to the problem. I thought I would try to disable 
   the different anti spam options to see if that made a difference. My settings
   included an option to enable an anti-spam honeypot. I read through some more 
   documentation and learned this this option is only available on forms created
   prior to plugin version 1.6.2.
 * So, I created a new simple contact form identical to the original, enabled anti-
   spam protection and Akismet anti-spam protection (the anti-spam honeypot option
   was no longer available) and now it works fine without the error. This works 
   on both my live and local development sites.
 * I guess the form was too old for the updated plugin.
 * Thanks for your help and suggestions. Maybe this will help others.
 *  [Prashant Rai](https://wordpress.org/support/users/prashantrai/)
 * (@prashantrai)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/php-errors-with-contact-form/#post-16642818)
 * Hey @darrylbosch – Thanks for sharing the details, and I’m glad you were able
   to fix the issue. If you have any questions, please feel free to reachout.
 * Kindly,

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘PHP Errors with Contact Form’ is closed to new replies.

 * ![](https://ps.w.org/wpforms-lite/assets/icon.svg?rev=3254748)
 * [WPForms - Easy Form Builder for WordPress - Contact Forms, Payment Forms, Surveys, & More](https://wordpress.org/plugins/wpforms-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpforms-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpforms-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/wpforms-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpforms-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpforms-lite/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [Prashant Rai](https://wordpress.org/support/users/prashantrai/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/php-errors-with-contact-form/#post-16642818)
 * Status: resolved