Title: Fatal error &#8211; argument #1 must be string, array given
Last modified: October 25, 2021

---

# Fatal error – argument #1 must be string, array given

 *  Resolved [kees78](https://wordpress.org/support/users/kees78/)
 * (@kees78)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-argument-1-must-be-string-array-given/)
 * 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 4 years, 7 months ago by [kees78](https://wordpress.org/support/users/kees78/).

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

 *  [Elvira K.](https://wordpress.org/support/users/treibalen/)
 * (@treibalen)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-argument-1-must-be-string-array-given/#post-15012322)
 * Hi there [@kees78](https://wordpress.org/support/users/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!
 *  [Elvira K.](https://wordpress.org/support/users/treibalen/)
 * (@treibalen)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-argument-1-must-be-string-array-given/#post-15072559)
 * Hi there [@kees78](https://wordpress.org/support/users/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](https://wordpress.org/support/users/kees78/)
 * (@kees78)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-argument-1-must-be-string-array-given/#post-15072799)
 * Sorry, turned out a field was set as hidden, mandatory but not auto filled.
    
   After changing, error disappeared.
 *  [Elvira K.](https://wordpress.org/support/users/treibalen/)
 * (@treibalen)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-argument-1-must-be-string-array-given/#post-15072968)
 * Hi there [@kees78](https://wordpress.org/support/users/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.

 * ![](https://ps.w.org/mailpoet/assets/icon-256x256.png?rev=3284564)
 * [MailPoet - Newsletters, Email Marketing, and Automation](https://wordpress.org/plugins/mailpoet/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailpoet/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailpoet/)
 * [Active Topics](https://wordpress.org/support/plugin/mailpoet/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailpoet/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailpoet/reviews/)

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)

 * 4 replies
 * 2 participants
 * Last reply from: [Elvira K.](https://wordpress.org/support/users/treibalen/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-argument-1-must-be-string-array-given/#post-15072968)
 * Status: resolved