Here is what I sent to Formidable Pro:
I get the following error message in my error log when using Formidable Pro and WP PGP Encrypted Emails together:
trim() expects parameter 1 to be string, array given
I make an edit to the wp-includes/class-wp-user.php file on line 201 to remove the trim call and then I’ll get this error message from WP PGP Encrypted Emails:
Cannot send encrypted email to Array
So I’m wondering if Formidable Pro is doing anything funky here or if I should be barking up another tree. Thanks!
Here is their response:
The wp_mail function is setup to accept either strings or arrays for several parameters. You can find more info on that here:
https://developer.ww.wp.xz.cn/reference/functions/wp_mail/
It sounds like the encryption plugin isn’t setup to handle those arrays. Maybe you can contact them and ask them to make adjustments to allow for both?
Plugin Author
Meitar
(@meitar)
Can you confirm that Formidable is experiencing the same issue? I do not have Formidable Pro and cannot get it because it costs money, but if the free version is based on the same codebase I can look into that. I just want to make sure I’m on the right track before I try. 🙂 Thanks for reporting the issue!
Totally understand. I have a test instance I can get up and running and see if I can get it to work. I’ll report back soon.
Same thing from a test site running 4.4.2 with the free version of Formidable and 0.3.0 of your plugin (since 0.4.0 threw me the syntax error that I started an issue on at GitHub).
PHP Warning: trim() expects parameter 1 to be string, array given in /srv/www/htdocs/wp-includes/class-wp-user.php on line 201, referer: http://blogs.mlc-wels.edu/bits-to-bytes/test-page/
Also, the email notification is sent, but it is not encrypted.
Plugin Author
Meitar
(@meitar)
Cool, I will have a look ASAP. Can you add this issue to the GitHub tracker, too?
Plugin Author
Meitar
(@meitar)
Thanks for adding this to the GitHub issue tracker; I will mark this “resolved” as it seems to be a bug and should be tracked there as such. Resolution will be to update to a later version of the plugin after I release an update.