Solved: htmlspecialchars() expects parameter 1

More
12 years 9 months ago #411 by Sandra
After updating my php to 5.2.17. I got the following error.

Warning: htmlspecialchars() expects parameter 1 to be string, array given in administrator/components/com_oscommerce/includes/functions/general.php on line 266

to solve this problem change:

find:
Code:
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); } } }

I changed line 40 to this:
if ($protected == false) {

Changed the true to false and it solve the problem.

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

Please Log in or Create an account to join the conversation.

Events Joomla
MarvikShop
Finnaly it's here:
 
No bridges, no look a likes!
This is the ultimate integration
between Oscommerce and Joomla!
Documentation
Site Showcase
Follow us