mattih5 Posted January 23, 2006 Posted January 23, 2006 Hi, Could anyone suggest what could be causing this error on the checkout_confirmation.php page: Warning: htmlspecialchars() expects parameter 1 to be a string, array given in /home/httpd/alibongo/httpdocs/catalog/includes/functions/general.php on line 42. I get this error on the Delivery Address section and also the Billing Address section. Thanks
Sharon_U Posted January 26, 2006 Posted January 26, 2006 Hi, I have this exact problem/error warning and wondering if you ever got it working, Matt or anyone? I'm looking at this line in my general.php but I don't know what to change. function tep_parse_input_field_data($data, $parse) { return strtr(trim($data), $parse); } function tep_output_string($string, $translate = false, $protected = false) { if ($protected == true) { return htmlspecialchars($string); } else { if ($translate == false) { return tep_parse_input_field_data($string, array('"' => '"')); } else { return tep_parse_input_field_data($string, $translate); } } } Posted on another message is this helpful link: http://us3.php.net/manual/en/function.htmlspecialchars.php Sorry, I'm really too new to understand the arrays and how to expand it beyond, etc. Sincerely, Sharon
Sharon_U Posted January 26, 2006 Posted January 26, 2006 Fixed mine by reviewing the bug report. http://www.oscommerce.com/community/bugs,1...tmlspecialchars There are two lines to change in the general.php. Good luck!!
Guest Posted January 26, 2006 Posted January 26, 2006 its the tep_output_string_protected that can cause this. When you call it make sure you pass a string and not an array as the parameter. Check what contributions you installed or what mods you've made. You can narrow down the problem by inserting some debug code when this function is called.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.