Title: Changing settings gives PHP error
Last modified: August 21, 2016

---

# Changing settings gives PHP error

 *  Resolved [Vijay Padiyar](https://wordpress.org/support/users/vijaypadiyar/)
 * (@vijaypadiyar)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/changing-settings-gives-php-error/)
 * 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](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/](http://wordpress.org/extend/plugins/wp-smushit/)

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

 *  [jo1st](https://wordpress.org/support/users/jo1st/)
 * (@jo1st)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/changing-settings-gives-php-error/#post-3932388)
 * 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](https://wordpress.org/support/users/jack-kitterhing/)
 * (@jack-kitterhing)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/changing-settings-gives-php-error/#post-3932402)
 * 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.
 *  Plugin Author [WPMU DEV – Your All-in-One WordPress Platform](https://wordpress.org/support/users/wpmudev/)
 * (@wpmudev)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/changing-settings-gives-php-error/#post-3932439)
 * 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](https://wordpress.org/support/users/vijaypadiyar/)
 * (@vijaypadiyar)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/changing-settings-gives-php-error/#post-3932451)
 * Thanks, the latest version has fixed all outstanding issues!
 *  [Mike](https://wordpress.org/support/users/michael-copestake/)
 * (@michael-copestake)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/changing-settings-gives-php-error/#post-3932471)
 * 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.

 * ![](https://ps.w.org/wp-smushit/assets/icon-256x256.gif?rev=3447113)
 * [Smush – Image Optimization, Compression, Lazy Load, WebP & CDN](https://wordpress.org/plugins/wp-smushit/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-smushit/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-smushit/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-smushit/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-smushit/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-smushit/reviews/)

## Tags

 * [settings](https://wordpress.org/support/topic-tag/settings/)
 * [smush](https://wordpress.org/support/topic-tag/smush/)

 * 5 replies
 * 5 participants
 * Last reply from: [Mike](https://wordpress.org/support/users/michael-copestake/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/changing-settings-gives-php-error/#post-3932471)
 * Status: resolved