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

Popular automatic website translation tool

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

Postby ejb01 » Mon Mar 30, 2015 9:14 pm

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
ejb01
 
Posts: 8
Joined: Mon Mar 30, 2015 9:09 pm

Re: Warning: trim() expects parameter 1 to be string, array

Postby Edvard » Mon Mar 30, 2015 9:33 pm

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!
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4179
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Warning: trim() expects parameter 1 to be string, array

Postby ejb01 » Mon Mar 30, 2015 9:35 pm

Hi Edvard, will you be able to check it with the server address?
ejb01
 
Posts: 8
Joined: Mon Mar 30, 2015 9:09 pm

Re: Warning: trim() expects parameter 1 to be string, array

Postby Edvard » Mon Mar 30, 2015 10:03 pm

Probably if I see the full error I can point out what is the cause.

Thanks!
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4179
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Warning: trim() expects parameter 1 to be string, array

Postby ejb01 » Mon Mar 30, 2015 10:18 pm

Here you go Edvard, really hope it helps...!
http://mi-linux.wlv.ac.uk/~1432932/wordpress/

Thanks in advance...
ejb01
 
Posts: 8
Joined: Mon Mar 30, 2015 9:09 pm

Re: Warning: trim() expects parameter 1 to be string, array

Postby Edvard » Mon Mar 30, 2015 11:18 pm

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!
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4179
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Warning: trim() expects parameter 1 to be string, array

Postby ejb01 » Tue Mar 31, 2015 4:53 pm

Thanks Edvard, how do I turn off the error / warning messages?

Thanks, Emma
ejb01
 
Posts: 8
Joined: Mon Mar 30, 2015 9:09 pm

Re: Warning: trim() expects parameter 1 to be string, array

Postby Edvard » Tue Mar 31, 2015 9:28 pm

It is hosting specific, so the best way is to consult with your hosting provider.

Thanks!
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4179
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Warning: trim() expects parameter 1 to be string, array

Postby ejb01 » Thu Apr 09, 2015 8:22 pm

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
ejb01
 
Posts: 8
Joined: Mon Mar 30, 2015 9:09 pm

Re: Warning: trim() expects parameter 1 to be string, array

Postby Edvard » Fri Apr 10, 2015 9:32 pm

Hi Emma,

I have asked to contact your hosting provider to ask how to turn off the warning messages. Have you done that?

Thanks!
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4179
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Warning: trim() expects parameter 1 to be string, array

Postby ejb01 » Tue Apr 14, 2015 12:49 pm

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
ejb01
 
Posts: 8
Joined: Mon Mar 30, 2015 9:09 pm

Re: Warning: trim() expects parameter 1 to be string, array

Postby Yana » Tue Apr 14, 2015 7:13 pm

Dear Emma,
You can disable errors via php.ini file.
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4129
Joined: Thu Jan 12, 2012 6:21 pm


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

2GLux
cron