tinkertrain Posted July 22, 2008 Posted July 22, 2008 Version: OsCommerce Online Merchant v2.2 RC2 Issue: htmlspecialchars() expects parameter 1 to be string, array given Description: While in the admin panel, (in admin/orders.php) orders show as line items fine although when you click on the edit button, invoice button or packing slip button I receive the following: Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/content/X/X/X/XXXXXXXXXXX/html/store/admin/includes/functions/general.php on line 40 general.php line #40: function tep_parse_input_field_data($data, $parse) { The correct information for the customer, bill to, & ship to etc.. is present below the 'error(s)' as well as their correct order details. This error does not appear anywhere else (that I've seen)in the program. I have read numerous posts regarding 'Warning: htmlspecialchars()' and tried some with no luck. For 2 days now I've tinkered with it off & on and I'm a bit mystified. Anything specific would be greatly appreciated. Kind thanks in advance.
twinthings Posted July 23, 2008 Posted July 23, 2008 Version:OsCommerce Online Merchant v2.2 RC2 Issue: htmlspecialchars() expects parameter 1 to be string, array given Description: While in the admin panel, (in admin/orders.php) orders show as line items fine although when you click on the edit button, invoice button or packing slip button I receive the following: Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/content/X/X/X/XXXXXXXXXXX/html/store/admin/includes/functions/general.php on line 40 general.php line #40: function tep_parse_input_field_data($data, $parse) { The correct information for the customer, bill to, & ship to etc.. is present below the 'error(s)' as well as their correct order details. This error does not appear anywhere else (that I've seen)in the program. I have read numerous posts regarding 'Warning: htmlspecialchars()' and tried some with no luck. For 2 days now I've tinkered with it off & on and I'm a bit mystified. Anything specific would be greatly appreciated. Kind thanks in advance. Hi, I have the same problem but mine is on line 42. Have no idea how to fix it either. Fiona
tinkertrain Posted July 23, 2008 Author Posted July 23, 2008 Hi Fiona, Looks like this one we won't get an answer on. BUT, I'm hopeful.
tinkertrain Posted July 24, 2008 Author Posted July 24, 2008 Hi Fiona, I fixed this (at least for me) in: admin/includes/functions/general.php (and our line numbers may be a bit different due to some other modifications I've made) find: 38 function tep_output_string($string, $translate = false, $protected = false) { 40 if ($protected == true) { 41 return htmlspecialchars($string); 42 } else { 43 if ($translate == false) { 44 return tep_parse_input_field_data($string, array('"' => '"')); 45 } else { 46 return tep_parse_input_field_data($string, $translate); 47 } 48 } 49 } I changed line 40 to this: 40 if ($protected == false) { Changed the true to false and it cured it. I hope this helps you too.
monster061 Posted August 28, 2008 Posted August 28, 2008 Oh that totally worked for me! Thanks! Worked for me also, thanks alot !!! The creator of www.futomart.com
mrnevets Posted July 26, 2010 Posted July 26, 2010 Thanks, I had to do the edit in 2 spots...but that error is gone now. catalog/admin/includes/functions/general.php catalog/includes/functions/general.php He who sits in jelly, has ass in jam.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.