WordPress.org

Ready to get started?Download WordPress

Forums

WP Smush.it
[resolved] Changing settings gives PHP error (6 posts)

  1. Vijay Padiyar
    Member
    Posted 1 year ago #

    I am using latest version of WP Smush.it (v1.6.5) with latest version of WordPress.

    I see the following error when I try to change any WP Smush.it settings under Settings > Media.

    Warning: trim() expects parameter 1 to be string, array given in /home/xxxxxxx/public_html/wp-admin/options.php on line 147

    Warning: trim() expects parameter 1 to be string, array given in /home/xxxxxxx/public_html/wp-admin/options.php on line 147

    Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxxx/public_html/wp-admin/options.php:147) in /home/xxxxxxx/public_html/wp-includes/pluggable.php on line 876

    I see there is already a thread dedicated to this error (http://wordpress.org/support/topic/multiple-warnings-and-errors-using-smushit), but it was marked as "Resolved" without any real resolution of the issue, hence opening a new thread.

    http://wordpress.org/extend/plugins/wp-smushit/

  2. jo1st
    Member
    Posted 1 year ago #

    any solutions to this problem?? same over here, this is no good, can't change the settings and remove the process on upload that is way to slow. it is better to smushit bulk.

    can anyone help

  3. Hi there,

    Thanks for bringing this up, I have tried to replicate but have been unable to.

    This message indicates that somewhere on your installation a php file outputs headers before its time.
    You can solve this issue by following the process below:
    Switch your theme to the default twentytwelve theme and deactivate all other plugins except the Smush.it plugin.
    You should now see that this error no longer exists.
    To find out which plugin/theme triggers this issue, start activating them one-by-one and test again.
    Finally, activate your previously selected theme.

    Next, you'll have to inspect the files of the plugin that triggers this error.

    Open all php files one by one and check for the following:

    If there is a space or blank line before the opening <?php tag on the file, delete those spaces or lines.

    If there is a closing ?> tag at the end of the file, delete it.

    As stated in the PHP docs,

    The closing tag of a PHP block at the end of a file is optional, and in some cases omitting it is helpful when using include or require, so unwanted whitespace will not occur at the end of files, and you will still be able to add headers to the response later. It is also handy if you use output buffering, and would not like to see added unwanted whitespace at the end of the parts generated by the included files.

    Please advise, if this fixes the issue.

    Thank you!

    Kind Regards
    Jack.

  4. WPMUDEV
    WPMU DEV Support Staff
    Plugin Author

    Posted 11 months ago #

    Hey there.

    We haven't heard from you in awhile, so I just wanted to check in to make sure all was good.

    This thread was marked resolved, but please, if you still need help then just respond and open it back up. We can then take it from there. :)

    Hope you have a fantastic day!

  5. Vijay Padiyar
    Member
    Posted 11 months ago #

    Thanks, the latest version has fixed all outstanding issues!

  6. Mike
    WPMU DEV Support Staff
    Posted 10 months ago #

    That's great! Thanks for letting us know :-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic