Forum Archive - Warning: trim() expects parameter 1 to be string, array give

Warning: trim() expects parameter 1 to be string, array give
Mar 30, 2015 5:14 pm by ejb01
Hi There, I am getting the following message "Warning: trim() expects parameter 1 to be string, array given in" then my server address, with the file name of option.php I have downloaded the latest version as advised to do so but I am still getting the message when I view. Can you help me please, as I don't understand the error message. Many Thanks, Emma
Re: Warning: trim() expects parameter 1 to be string, array
Mar 30, 2015 5:33 pm by Edvard
Hi Emma, Please post your website address, so I can check it. This warning doesn't seem to have any relation to our module, since it says that the issue is in option.php which is not a part of our module. Thanks!
Re: Warning: trim() expects parameter 1 to be string, array
Mar 30, 2015 5:35 pm by ejb01
Hi Edvard, will you be able to check it with the server address?
Re: Warning: trim() expects parameter 1 to be string, array
Mar 30, 2015 6:03 pm by Edvard
Probably if I see the full error I can point out what is the cause. Thanks!
Re: Warning: trim() expects parameter 1 to be string, array
Mar 30, 2015 6:18 pm by ejb01
Here you go Edvard, really hope it helps...! http://mi-linux.wlv.ac.uk/~1432932/wordpress/ Thanks in advance...
Re: Warning: trim() expects parameter 1 to be string, array
Mar 30, 2015 7:18 pm by Edvard
Please check what you have in wp-includes/option.php on line 28. I would recommend to turn off the error and warning messages when your site goes live. Thanks!
Re: Warning: trim() expects parameter 1 to be string, array
Mar 31, 2015 12:53 pm by ejb01
Thanks Edvard, how do I turn off the error / warning messages? Thanks, Emma
Re: Warning: trim() expects parameter 1 to be string, array
Mar 31, 2015 5:28 pm by Edvard
It is hosting specific, so the best way is to consult with your hosting provider. Thanks!
Re: Warning: trim() expects parameter 1 to be string, array
Apr 9, 2015 4:22 pm by ejb01
Hi Edvard, on line 28 it reads: $option = trim( $option ); I've tried different things, but my knowledge of .php is very small. I hope you can help me as I really like this plugin and I can't understand why it isn't working. When I deactivate from wordpress the error disappears but then so does the plugin.. There is a function being called above line 28, if it helps its: function get_option( $option, $default = false ) { global $wpdb; $option = trim( $option ); if ( empty( $option ) ) return false; Look forward to your help, and if you need any more code that may be helpful please let me know Many thanks, Emma
Re: Warning: trim() expects parameter 1 to be string, array
Apr 10, 2015 5:32 pm by Edvard
Hi Emma, I have asked to contact your hosting provider to ask how to turn off the warning messages. Have you done that? Thanks!
Re: Warning: trim() expects parameter 1 to be string, array
Apr 14, 2015 8:49 am by ejb01
Hi Edvard, The site is only on a local server at the moment, are you able to turn off messages on the server? Thanks, Emma
Re: Warning: trim() expects parameter 1 to be string, array
Apr 14, 2015 3:13 pm by Yana
Dear Emma, You can disable errors via php.ini file.

SIMILAR TOPICS

Need to give GTranlate login credentialsFeb 23, 2018 7:07 pmReplies: 1Post by: rcrooks
Change language using a URL parameter: site.com?lang=DEJan 4, 2018 4:16 pmReplies: 4Post by: jivan
Warnings on array parameter and headers already sent byMay 26, 2016 1:31 pmReplies: 5Post by: acyba
WP_Widget Incompatibility WarningJan 20, 2016 7:30 pmReplies: 1Post by: judahn
What is the source of this warning?Mar 11, 2015 4:31 amReplies: 3Post by: innerself

Try GTranslate with a free 15 day trial