• Resolved kees78

    (@kees78)


    Hi,

    We have a manage your subscription page with a couple of custom fields such as company name, adress etc.

    However, when people change the info in their fields, a fatal error occurs: PHP Fatal error: Uncaught TypeError: trim(): Argument #1 ($string) must be of type string, array given in …./public_html/wp-content/plugins/mailpoet/lib/Subscription/Manage.php:179

    Stack trace:
    #0 /home/bloemenc/domains/bloemencorso-bollenstreek.nl/public_html/wp-content/plugins/mailpoet/lib/Subscription/Manage.php(179): trim()
    #1 /home/bloemenc/domains/bloemencorso-bollenstreek.nl/public_html/wp-content/plugins/mailpoet/lib/Subscription/Manage.php(110): MailPoet\Subscription\Manage->filterOutEmptyMandatoryFields()
    #2 /home/bloemenc/domains/bloemencorso-bollenstreek.nl/public_html/wp-includes/class-wp-hook.php(303): MailPoet\Subscription\Manage->onSave()
    #3 /home/bloemenc/domains/bloemencorso-bollenstreek.nl/public_html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #4 /home/bloemenc/domains/bloemencorso-bollenstreek.nl/public_html/wp-includes/plugin.php(470): WP_Hook->do_action()
    #5 /home/bloemenc/domains/bloemencorso-bollenstreek.nl/public_html/wp-admin/admin-post.php(51): do_action()
    #6 {main}
    thrown in /home/bloemenc/domains/bloemencorso-bollenstreek.nl/public_html/wp-content/plugins/mailpoet/lib/Subscription/Manage.php on line 179`

    Any idea what is causing this?

    Looking forward.

    • This topic was modified 3 years, 5 months ago by kees78.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi there @kees78,

    Thanks for reaching out!

    Can you please let me know which MailPoet version you’re using? We had this issue reported before but it was fixed in the latest versions.

    Looking forward to hearing back from you!

    Hi there @kees78,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

    Thread Starter kees78

    (@kees78)

    Sorry, turned out a field was set as hidden, mandatory but not auto filled.
    After changing, error disappeared.

    Hi there @kees78,

    Thank you for sharing the solution!

    Can you please advise if you’ve hidden it with custom CSS or a code snippet?

    I want to ensure it’s documented ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fatal error – argument #1 must be string, array given’ is closed to new replies.