Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

trim() expects parameter 1 to be string


Recommended Posts

Help please I was asked to transfer a friends website from one host to another. Now when using the search facility the following error message appears on the top of the results page:


Warning: trim() expects parameter 1 to be string, array given in /home/holid937/public_html/inc/xtc_parse_input_field_data.inc.php on line 20


you can try it yourself here:





The code that the error is referring to is:


/* -----------------------------------------------------------------------------------------
$Id: xtc_parse_input_field_data.inc.php,v 2007/12/15 12:32:41 jyotsna Exp $ [/font][/color]
XT-Commerce - community made shopping
Copyright (c) 2003 XT-Commerce
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(html_output.php,v 1.52 2003/03/19); www.oscommerce.com
(c) 2003 nextcommerce (xtc_parse_input_field_data.inc.php,v 1.3 2003/08/13); www.nextcommerce.org
Released under the GNU General Public License

// Parse the data used in the html tags to ensure the tags will not break
function xtc_parse_input_field_data($data, $parse) {
return strtr(trim($data), $parse);



my knowledge on php is limited and I'm not sure where the variables are defined but I could search the files if I knew what I was looking for.


Please help!!!

Link to comment
Share on other sites

You need to look further and find where function xtc_parse_input_field_data() is used


$data, this is what the error message complain about, is pushed to the function from wherever it is used like this maybe


xtc_parse_input_field_data($kuku, $lala)


kuku and lala are the function parameters $data and $parse and they must be defined in the file that use the function. You need to make sure that first parameter is defined and that it is a string

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...