• Resolved Zakir Hossen Sujon

    (@zakir021063008)


    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

    (@haseeb0001)

    @zakir021063008 Hi,

    I hope you are doing well.

    Please share Post SMTP diagnostic test report.

    Thanks

    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:

    $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

    (@haseeb0001)

    @loxlie Hi,

    let me look into it and discuss it with my team.

    Thanks

    Plugin Support M Haseeb

    (@haseeb0001)

    Hi @zakir021063008 @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.