Title: PHP Warning: Array to string conversion on class-wp-scripts.php
Last modified: January 28, 2023

---

# PHP Warning: Array to string conversion on class-wp-scripts.php

 *  Resolved [zakir021063008](https://wordpress.org/support/users/zakir021063008/)
 * (@zakir021063008)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-warning-array-to-string-conversion-on-class-wp-scripts-php/)
 * Due to passing **Array** instead of **String** as a version number on `post-smtp/
   Postman/Postman-Suggest-Pro/PostmanSuggestProSocket.php` line no. 76 , WordPress
   throwing error `Array to string conversion in wp-includes/class-wp-scripts.php
   on line 349`

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

 *  Plugin Support [M Haseeb](https://wordpress.org/support/users/haseeb0001/)
 * (@haseeb0001)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-warning-array-to-string-conversion-on-class-wp-scripts-php/#post-16421857)
 * [@zakir021063008](https://wordpress.org/support/users/zakir021063008/) Hi,
 * I hope you are doing well.
 * Please share Post SMTP diagnostic test report.
 * Thanks
 *  [loxlie](https://wordpress.org/support/users/loxlie/)
 * (@loxlie)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-warning-array-to-string-conversion-on-class-wp-scripts-php/#post-16442235)
 * I accidentally created a duplicate issue, which I’ve closed, but here’s more 
   info from my topic. (It’s nothing to do with a particular config, so a report
   wouldn’t help.)
 * In PostmanSuggestProSocket.php there’s this:
 *     ```wp-block-code
       $pluginData = apply_filters( 'postman_get_plugin_metadata', null );
   
       wp_register_script( 'postman-suggest-pro-sockets', POST_SMTP_ASSETS . 'js/postman-suggest.js', array( 'jquery' ), $pluginData, true );
       ```
   
 * $pluginData is an array (with name and version fields). It should be passing 
   just the version field to the register call, but it’s passing the whole thing.
   If other plugins try to read the version on the enqueue, they’ll be expecting
   a string.
 * (In my case, I’m using the simple Rebusted plugin, which appends the filemod 
   date to the version string, and this causes an array to string conversion warning.)
 *  Plugin Support [M Haseeb](https://wordpress.org/support/users/haseeb0001/)
 * (@haseeb0001)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-warning-array-to-string-conversion-on-class-wp-scripts-php/#post-16451636)
 * [@loxlie](https://wordpress.org/support/users/loxlie/) Hi,
 * let me look into it and discuss it with my team.
 * Thanks
 *  Plugin Support [M Haseeb](https://wordpress.org/support/users/haseeb0001/)
 * (@haseeb0001)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/php-warning-array-to-string-conversion-on-class-wp-scripts-php/#post-16582886)
 * Hi [@zakir021063008](https://wordpress.org/support/users/zakir021063008/) [@loxlie](https://wordpress.org/support/users/loxlie/),
 * Thanks for reporting the issue. The mentioned case has been fixed in recent releases.
   
   Do let us know if still there is any thing else we can help you with.Thanks and
   regards,Support Team – WPExperts

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

The topic ‘PHP Warning: Array to string conversion on class-wp-scripts.php’ is closed
to new replies.

 * ![](https://ps.w.org/post-smtp/assets/icon-128x128.gif?rev=3209655)
 * [Post SMTP – Complete Email Deliverability and SMTP Solution with Email Logs, Alerts, Backup SMTP & Mobile App](https://wordpress.org/plugins/post-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/post-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-smtp/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [M Haseeb](https://wordpress.org/support/users/haseeb0001/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/php-warning-array-to-string-conversion-on-class-wp-scripts-php/#post-16582886)
 * Status: resolved