chrometweaks.org

Probably a common question. Which iPage hosting services are the best?

Click Here To View All Answers...


Got a quick question: Probably a common question. Which iPage hosting services are the best? Many thanks for any comment. My other question... Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/public_html/catalog/includes/functions/general.php on line 42.

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/public_html/catalog/includes/functions/general.php on line 42.

Is get this error in catalog/checkout_confirmation.php when I customer is trying to confirm his order.

Please help..?..

Comments (137)

That's a good question. I'm not sure what is the answer to that question. I'll do some research in Google and get back to you if I find an useful answer. You should email the people at iPage as they probably could answer your iPage question..

Comment #1

Line 40 - 47.

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);..

Comment #2

Also, in checkout_confirmation.php, what do you have for this line (around line 298)?.

<td class="main"><?php echo nl2br(tep_output_string_protected($order->info['comments']))tep_draw_hidden_field('comments', $order->info['comments']); ?></td>..

Comment #3

Did you make a change or add a contribution which touched checkout_confirmation.php? the function is correct, thus it is something which was / has been changed....

Comment #4

Line 246/249.

<tr>.

<td class="main"><?php echo nl2br(tep_output_string_protected($order->info['comments']))tep_draw_hidden_field('comments', $order->info['comments']); ?></td>.

</tr>..

Comment #5

Try:.

Change on line 42 of general.php.

...htmlspecialchars($whatever) ....

In.

...htmlspecialchars($whatever[0]) ....

Works for me, thanks mattice (oscommerce.nl) for the tip...

Comment #6

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/public_html/catalog/includes/functions/general.php on line 42.

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/public_html/catalog/includes/functions/general.php on line 42.

Is get this error in catalog/checkout_confirmation.php when I customer is trying to confirm his order.

Please help..?..

Comment #7

You will need to post the lines before and after line 42, not the whole program, and let us know what the beginning line number is. please, no more than 10 lines...

Comment #8


This question was taken from a support group/message board and re-posted here so others can learn from it.