Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem: PHP Fatal error: Uncaught TypeError: strlen(): Argument #1 while submitting the form

Solution: This is related to the following errata. The bug is fixed after upgrading to WPForms 1.8.5.2.

https://wpml.org/errata/wpforms-email-fields-not-translated-in-notification-emails/

Relevant Documentation: https://wpml.org/errata/wpforms-email-fields-not-translated-in-notification-emails/

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 8 replies, has 2 voices.

Last updated by Bigul 5 months, 2 weeks ago.

Assisted by: Bigul.

Author Posts
November 16, 2023 at 3:18 pm #14828323

thibaultG

PHP message: PHP Fatal error: Uncaught TypeError: strlen(): Argument #1 ($string) must be of type string, array given in /home/user_11570/app_11570/wp-includes/formatting.php:3551

November 17, 2023 at 6:38 am #14831905

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

Please check whether the issue exists in a minimal setup or not, and let us know your feedback.

To help you faster, I've enabled debug information for this support ticket. Please see this link for how to get this information from your site and give it to us: http://wpml.org/faq/provide-debug-information-faster-support/

--
Thanks!

Bigul

November 18, 2023 at 10:09 am #14867605

thibaultG

Hi,

I tested in minimal setup on my stagging site with only WPForms and WPML plugins enabled and minimal theme. Same issue.

Thank you for your help,

November 18, 2023 at 10:30 am #14867615

thibaultG

As a reference once again, here the error:

2023/11/18 10:10:37 [error] 9347#9347: *123194422 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: strlen(): Argument #1 ($string) must be of type string, array given in /home/user_11570/app_11570_staging/wp-includes/formatting.php:3557
Stack trace:
#0 /home/user_11570/app_11570_staging/wp-content/plugins/sitepress-multilingual-cms/classes/user-language/class-wpml-users-languages.php(47): is_email()
#1 /home/user_11570/app_11570_staging/wp-content/plugins/sitepress-multilingual-cms/classes/user-language/class-wpml-users-languages.php(36): WPML_Users_Languages->get_recipient_language()
#2 /home/user_11570/app_11570_staging/wp-content/plugins/sitepress-multilingual-cms/classes/user-language/class-wpml-users-languages.php(32): WPML_Users_Languages->wpml_user_language()
#3 /home/user_11570/app_11570_staging/wp-includes/class-wp-hook.php(324): WPML_Users_Languages->wpml_user_language_filter()
#4 /home/user_11570/app_11570_staging/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#5 /home/user_11570/app_11570_staging/wp-content/plugins/sitepress-" while reading response header from upstream, client: 83.193.43.242, server: , request: "POST /wp-admin/admin-ajax.php HTTP/2.0", upstream: "hidden link:", host: "", referrer: "/contact-us/"

November 19, 2023 at 5:14 pm #14871407

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

Thank you for the feedback. A couple of requests for tracking this bug.

1) Please let us know the exact steps to reproduce the issue on your site

2) Please fill the private details fields after a full site backup. I would like to access the admin area of your statging site for further checking. Refer to the following links for more details about our private information sharing policies.

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

hidden link

--
Thanks!

Bigul

November 20, 2023 at 7:04 am #14873203

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

Thank you for the details. I can reproduce the issue on your staging site. Just to make sure, so we have to do all the debugging and troubleshooting on your staging site? Normally we debug using the Duplicator copy of the site. Hope you have a backup of your staging site.

--
Thanks!

Bigul

November 20, 2023 at 7:09 am #14873207

thibaultG

Hi Bigul,

You are NOT allowed to duplicate the site. I can confirm you can debug using our staging site. We have backup, you can proceed.

Thank you,

Regards,

November 20, 2023 at 12:44 pm #14876871

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

Thank you for the updates. We are currently working on this and get back to you as early as possible. Please wait.

--
Thanks!

Bigul

November 20, 2023 at 4:03 pm #14879319

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

We have released an errata for this bug. Please try the workaround suggested in the following article after a full site backup{mandatory} and make sure you are getting the expected results or not. It is expected to be fixed in the future version of WPForms.

https://wpml.org/errata/wpforms-email-fields-not-translated-in-notification-emails/

--
Thanks!

Bigul

November 20, 2023 at 5:18 pm #14879835

thibaultG

Thanks for the quick fix!

thibaultG confirmed that the issue was resolved on 2023-11-20 17:18:26.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.