sputnikinternet Posted March 14, 2006 Posted March 14, 2006 I've searched the million posts related to this, but can't find a solution. All i've done is move the site to a new server, still mysql 4 though, and i get this at checkout. Billing Address (Edit) Warning: htmlspecialchars() expects parameter 1 to be string, array given in /homepages/4/d155525213/htdocs/musthavetoys/includes/functions/general.php on line 42 Warning: htmlspecialchars() expects parameter 1 to be string, array given in /homepages/4/d155525213/htdocs/musthavetoys/includes/functions/general.php on line 42 Payment Method (Edit) Credit/ Debit Card secure online transaction There seems to be a fix by hard coding a country, but we need to be international. Any suggestions?
Guest Posted March 14, 2006 Posted March 14, 2006 its probably an array (of countries?) that is passed through from the tep_output_string function. Like from tep_address_format. You shouldn't pass an array in the first place.
sputnikinternet Posted March 15, 2006 Author Posted March 15, 2006 i don't remember changing any of the code since it last worked. to get the error, i just logged on as an existing user. the site, by the way, is www.musthavetoys.com
sputnikinternet Posted March 15, 2006 Author Posted March 15, 2006 i don't remember changing any of the code since it last worked.to get the error, i just logged on as an existing user. the site, by the way, is www.musthavetoys.com All seems to be working. For some reason, although there were addresses set up for the user account, none were set as "primary address". I changed this for the user, and it all seems to be working.
findtim Posted October 26, 2006 Posted October 26, 2006 thanks for the info it helped solve my problem. i found that as i was just testing my site i'd just quickly type anything into the address and poscode areas. creating new accounts to beta test it, so i went and deleted all the fake acounts/addresses. didn't touch any CODE, and it cleaned up the error. hope that helps someone tim
vmaster Posted November 23, 2007 Posted November 23, 2007 thanks for the info it helped solve my problem. i found that as i was just testing my site i'd just quickly type anything into the address and poscode areas. creating new accounts to beta test it, so i went and deleted all the fake acounts/addresses. didn't touch any CODE, and it cleaned up the error. hope that helps someone tim In catalog\includes\functions\general.php find in tep_address_format: } elseif (isset($address['country']) && tep_not_null($address['country'])) { $country = tep_output_string_protected($address['country']); and replace with } elseif (isset($address['country']) && tep_not_null($address['country'])) { $country = tep_output_string_protected($address['country']['title']);
motorcity Posted December 3, 2007 Posted December 3, 2007 I tried both, removing all the junk accounts & adding the ['title']); vmaster suggested. I even cleared my browser ~ still goofs up. I installed http://addons.oscommerce.com/info/4691 from patch060817vs2003.txt; "The file catalog/includes/functions/general.php has not been included in the patch, even it was modified in the 060817 revision, as it is known to be buggy." My trouble is in my test store - testing authorize.net AIM Everything is running fine on the live store a.net AIM is installed but not yet launched. The test site is MySQL 5.0.27 Live site is MySQL 4.1.22 both are PHP Version: 5.0.5 Does anybody know if my problem is just the different mysql? Or if this has anything to do with a.net AIM anyway?
Guest Posted December 31, 2007 Posted December 31, 2007 I've searched the million posts related to this, but can't find a solution. All i've done is move the site to a new server, still mysql 4 though, and i get this at checkout.Billing Address (Edit) Warning: htmlspecialchars() expects parameter 1 to be string, array given in /homepages/4/d155525213/htdocs/musthavetoys/includes/functions/general.php on line 42 Warning: htmlspecialchars() expects parameter 1 to be string, array given in /homepages/4/d155525213/htdocs/musthavetoys/includes/functions/general.php on line 42 Payment Method (Edit) Credit/ Debit Card secure online transaction There seems to be a fix by hard coding a country, but we need to be international. Any suggestions? Don't know about you, but I got this after doing the patches to upgrade to RC1. When I removed the patch [bUGFIX] Country Name on the Order History Page to problem went away.
LED-Store Posted January 4, 2008 Posted January 4, 2008 I think I found a solution for this problem, I removed today the ['title'] beside the country tag because it helped me to see the whole country name in the account_history_info.php, and not only the first initial. But then I had the problem that I got the same error message, so I changed all ['country_id'] to ['country']['id'], like this: In catalog\includes\functions\general.php find in tep_address_format: if (isset($address['country']['id']) && tep_not_null($address['country']['id'])) { $country = tep_get_country_name($address['country']['id']); if (isset($address['zone_id']) && tep_not_null($address['zone_id'])) { $state = tep_get_zone_code($address['country']['id'], $address['zone_id'], $state); } } elseif (isset($address['country']) && tep_not_null($address['country'])) { $country = tep_output_string_protected($address['country']); } else { $country = ''; } I hope this could someone help, now my shipping estimator and payment modules are working fine.
danerb Posted February 26, 2010 Posted February 26, 2010 In catalog\includes\functions\general.php find in tep_address_format: } elseif (isset($address['country']) && tep_not_null($address['country'])) { $country = tep_output_string_protected($address['country']); and replace with } elseif (isset($address['country']) && tep_not_null($address['country'])) { $country = tep_output_string_protected($address['country']['title']); Thanks removed htmlspecialchars() error when using reorder addon over a clean rc2a install. "If it was easy everybody would be doing it"
jankopirnat Posted July 23, 2010 Posted July 23, 2010 In catalog\includes\functions\general.php find in tep_address_format: } elseif (isset($address['country']) && tep_not_null($address['country'])) { $country = tep_output_string_protected($address['country']); and replace with } elseif (isset($address['country']) && tep_not_null($address['country'])) { $country = tep_output_string_protected($address['country']['title']); ---------------------------------------------------------------------------------------------------- That contribution is great. It helped me solving the unpleasent error message on the screen.
ristojj Posted January 2, 2011 Posted January 2, 2011 This contribution solve my problem also Though, In additional to above, I had to replace every other entry of tep_output_string_protected($address['country']) to tep_output_string_protected($address['country']['title'])
rawaby88 Posted May 4, 2011 Posted May 4, 2011 In catalog\includes\functions\general.php find in tep_address_format: } elseif (isset($address['country']) && tep_not_null($address['country'])) { $country = tep_output_string_protected($address['country']); and replace with } elseif (isset($address['country']) && tep_not_null($address['country'])) { $country = tep_output_string_protected($address['country']['title']); thank you this work for me
findtim Posted June 29, 2011 Posted June 29, 2011 hi, this isn't working for me. I'm thinking it might have something to do with the " force country" mod i have installed as i only want to deliver within australia. could someone let me know if they are also using this mod so i can rule it IN or OUT of the problem. thanks tim
Recommended Posts
Archived
This topic is now archived and is closed to further replies.