Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Warning Message - Htmlspecialchars()


slanetx

Recommended Posts

Posted

Some orders are receiving the following Warning messages:

under Delivery and Billing Addresses:

"Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/xxxx/xxxxx/catalog/includes/functions/general.php

 

on line 47"

 

Here is the code from general.php:

// Parse the data used in the html tags to ensure the tags will not break

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); <<------ line 47

} else {

if ($translate == false) {

return tep_parse_input_field_data($string, array('"' => '"'));

} else {

return tep_parse_input_field_data($string, $translate);

}

}

}

 

Can anyone tell me: 1) why this is happening and 2) how to fix it so that the warnings do not appear.

 

Thanks,

Sharon

"If you obey all the rules, you miss all the fun." Katherine Hepburn

Archived

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

×
×
  • Create New...