Title: PHP Warning: trim() expects parameter 1 to be string, array given
Last modified: May 12, 2020

---

# PHP Warning: trim() expects parameter 1 to be string, array given

 *  Resolved [krut1](https://wordpress.org/support/users/krut1/)
 * (@krut1)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-warning-trim-expects-parameter-1-to-be-string-array-given/)
 * I am using PRO version of ypur plugin. I have a lot of PHP-warnings in LOG:
 * `[12-May-2020 11:01:48 UTC] PHP Warning: trim() expects parameter 1 to be string,
   array given in /wordpress/wp-content/plugins/woo-variation-swatches-pro/woo-variation-
   swatches-pro.php on line 109`
 * On this line you are checking the licence key:
 * `$license_key = trim( woo_variation_swatches()->get_option( 'license_key' ) );`
 * But the problem is, that the license_key is stored as array:
 * `Array ( [license_key] => Array ( [id] => license_key [type] => string [value]
   => ... ) )`
 * Could you please fi it?

Viewing 1 replies (of 1 total)

 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-warning-trim-expects-parameter-1-to-be-string-array-given/#post-12823268)
 * > I am using PRO version of ypur plugin.
 * I’m sorry but the author cannot help you here. They are not allowed to.
 * For pro or commercial product support please contact the author directly on their
   site. This includes any pre-sales topics as well.
 * As the author is aware, commercial products are [not supported in these forums](https://wordpress.org/support/guidelines/#do-not-post-about-commercial-products).
   I am sure they will have no problem supporting you there.

Viewing 1 replies (of 1 total)

The topic ‘PHP Warning: trim() expects parameter 1 to be string, array given’ is
closed to new replies.

 * ![](https://ps.w.org/variation-swatches-for-woocommerce/assets/icon-256x256.png?
   rev=2602534)
 * [Variation Swatches for WooCommerce](https://wordpress.org/plugins/variation-swatches-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/variation-swatches-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/variation-swatches-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/variation-swatches-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/variation-swatches-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/variation-swatches-for-woocommerce/reviews/)

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [pro](https://wordpress.org/support/topic-tag/pro/)
 * [warning](https://wordpress.org/support/topic-tag/warning/)

 * 1 reply
 * 1 participant
 * Last reply from: [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/php-warning-trim-expects-parameter-1-to-be-string-array-given/#post-12823268)
 * Status: resolved