Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error in account_history_info.php page


danthman

Recommended Posts

In a heavily modified installation I am receiving the following error when checking on a previous order in my account history from the account_history_info.php page:

 

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

 

It appears in the shipping address and the billing address but nowhere else. Below the message the address is correct so it does not appear to affect anything and it is not breaking the page. How can I correct it? Can I get rid of it?

Link to comment
Share on other sites

In a heavily modified installation I am receiving the following error when checking on a previous order in my account history from the account_history_info.php page:

 

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

 

It appears in the shipping address and the billing address but nowhere else. Below the message the address is correct so it does not appear to affect anything and it is not breaking the page. How can I correct it? Can I get rid of it?

Does anyone know what this is about? Does anyone know what parameter 1 is? It doesn't seem to hurt anything since the address appears below it. Can I stop it from showing up?

Link to comment
Share on other sites

Does anyone know what this is about? Does anyone know what parameter 1 is? It doesn't seem to hurt anything since the address appears below it. Can I stop it from showing up?

 

the error message says it all...you just need to learn how to translate it.

 

somewhere in account_history_info.php there is a call to tep_output_string(), which is defined in general.php. tep_output_string() calls htmlspecialchars(), which expects the first parameter to be a string, but since tep_output_string() was passed an arrray, it passes this to htmlspecialchars() -- causing your error. now the error *doesn't* say where the call to tep_output_string() is, so you will have to look at each time this is called and try to determine which one is being called with an array. you might start looking in the areas where you last tried installing a contribution or making other changes.

 

i hope this helps.

Link to comment
Share on other sites

the error message says it all...you just need to learn how to translate it.

 

somewhere in account_history_info.php there is a call to tep_output_string(), which is defined in general.php. tep_output_string() calls htmlspecialchars(), which expects the first parameter to be a string, but since tep_output_string() was passed an arrray, it passes this to htmlspecialchars() -- causing your error. now the error *doesn't* say where the call to tep_output_string() is, so you will have to look at each time this is called and try to determine which one is being called with an array. you might start looking in the areas where you last tried installing a contribution or making other changes.

 

i hope this helps.

Thanks for your direction, I really appreciate it since I'm over my head on this one. I searched account_history_info.php but no tep_output_string(), there is, however a tep_output_string_protected($statuses['comments']).

Looking in general.php there are plenty of tep_output_string_protected() such as tep_output_string_protected($address['country']) but no tep_output_string_protected($statuses['comments']). I do not recall making any changes to the account_history_info.php. Any idea where to look now?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...