paq1200 Posted February 28, 2008 Posted February 28, 2008 I am getting the following error but I dont know what it is from. How do I find out what is causing the error? In the log file the following error is shown: [28-Feb-2008 07:41:27] PHP Warning: htmlspecialchars() expects parameter 1 to be string, array given in /includes/functions/general.php on line 47 when I go to includes/functions/general.php and look at line 47 it has the following: return htmlspecialchars($string); below is the complete code block: 40 // Parse the data used in the html tags to ensure the tags will not break 41 function tep_parse_input_field_data($data, $parse) { 42 return strtr(trim($data), $parse); 43 } 44 45 function tep_output_string($string, $translate = false, $protected = false) { 46 if ($protected == true) { 47 return htmlspecialchars($string); 48 } else { 49 if ($translate == false) { 50 return tep_parse_input_field_data($string, array('"' => '"')); 51 } else { 52 return tep_parse_input_field_data($string, $translate); 53 } 54 } 55 } 56 57 function tep_output_string_protected($string) { 58 return tep_output_string($string, false, true); 59 } 60 61 function tep_sanitize_string($string) { 62 $string = ereg_replace(' +', ' ', trim($string)); 63 64 return preg_replace("/[<>]/", '_', $string); 65 } Any help with this is appreciated. I am a new to php and not sure how to correct it or even find out why it is happening. Mike
Recommended Posts
Archived
This topic is now archived and is closed to further replies.