Wizbits Posted February 13, 2010 Share Posted February 13, 2010 Help please. I get the following error Warning: htmlspecialchars() expects parameter 1 to be string, array given in catalog/includes/functions/general.php on line 42 My code looks like this function tep_output_string($string, $translate = false, $protected = false) { if ($protected == true) { return htmlspecialchars($string); <--(LINE 42) } else { if ($translate == false) { return tep_parse_input_field_data($string, array('"' => '"')); } else { return tep_parse_input_field_data($string, $translate); } } } Any suggestions please Thanks Link to comment Share on other sites More sharing options...
satish Posted September 20, 2010 Share Posted September 20, 2010 replace above code with following function tep_output_string($string, $translate = false, $protected = false) { if ($protected == true) { return @htmlspecialchars($string); <--(LINE 42) } else { if ($translate == false) { return tep_parse_input_field_data($string, array('"' => '"')); } else { return tep_parse_input_field_data($string, $translate); } } } Satish Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.