pure-dvd.com Posted February 8, 2004 Share Posted February 8, 2004 When an order is processed the error message below appears rather than a pre-input billing address????? Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/virtual/site162/fst/var/www/html/store/includes/functions/general.php on line 42 Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/virtual/site162/fst/var/www/html/store/includes/functions/general.php on line 42 The code reads: //// // 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); } else { if ($translate == false) { return tep_parse_input_field_data($string, array('"' => '"')); } else { return tep_parse_input_field_data($string, $translate); } } } ANY help or advice on this matter would be greatly appreciated!! Maybe check it against your program to see the difference? Preventing alot of business at the moment :angry: Link to comment Share on other sites More sharing options...
♥yesudo Posted February 8, 2004 Share Posted February 8, 2004 ours is the same: //// // 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); ? ?} else { ? ? ?if ($translate == false) { ? ? ? ?return tep_parse_input_field_data($string, array('"' => '"')); ? ? ?} else { ? ? ? ?return tep_parse_input_field_data($string, $translate); ? ? ?} ? ?} ?} what is the reference to htmlspecialchars() ? Your online success is Paramount. Link to comment Share on other sites More sharing options...
pure-dvd.com Posted February 8, 2004 Author Share Posted February 8, 2004 Thanks very much for that, as far as the 'reference to htmlspecialchars()', I'm totally lost!!? I have gone through the whole process using test details & this happens every time. As you say, yours is exactly the same, now I'm even more confused, I was expecting an obvious error!! Any more advice from anybody would be great! Link to comment Share on other sites More sharing options...
OceanRanch Posted February 8, 2004 Share Posted February 8, 2004 Here's a thread that had same problem and solved it because the default shipping address for accounts was not being set properly. I'm not sure if this will fix it for you though. http://www.oscommerce.com/forums/index.php?sho...tmlspecialchars Also they mention that the Purchase with account contribution allowed blank lines for shipping address and that caused problems from time to time in the function htmlspecialchars. Maybe this will help??? Tom Link to comment Share on other sites More sharing options...
Guest Posted April 4, 2004 Share Posted April 4, 2004 This problem can be caused by a field such as 'entry_country_id' in the address_book table being invalid or empty. Matti Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.