Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Warning: htmlspecialchars expects....


mattih5

Recommended Posts

Posted

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

Posted

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

Posted

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.

Archived

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

×
×
  • Create New...