• Resolved Vijay Padiyar

    (@vijaypadiyar)


    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 (https://www.ads-software.com/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.

    https://www.ads-software.com/extend/plugins/wp-smushit/

Viewing 5 replies - 1 through 5 (of 5 total)
  • 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

    Jack K

    (@jack-kitterhing)

    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.

    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!

    Thread Starter Vijay Padiyar

    (@vijaypadiyar)

    Thanks, the latest version has fixed all outstanding issues!

    Mike

    (@michael-copestake)

    That’s great! Thanks for letting us know ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Changing settings gives PHP error’ is closed to new replies.