badass Posted July 18, 2004 Posted July 18, 2004 I'm using alot of contributions, en lately i'm getting this error in checkout confirmation.php in the last prcess of an order. Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/***/public_html/***/catalog/includes/functions/general.php on line 42 The problem is i dont know when i how i created this error, does somebody knows how i can get rid of this, it's scaring away my customers.. :ph34r:
Guest Posted July 18, 2004 Posted July 18, 2004 You saved the original code right? Go to that file and look at line 42 if you cant figure it out post the code someone will help. IMPORTANT:SAVE AND BACKUP ROLF
badass Posted July 18, 2004 Author Posted July 18, 2004 Already tried that, but the error is still showing. What file may else be corrupted??
badass Posted July 18, 2004 Author Posted July 18, 2004 I copied the original file, confirmation_checkout.php I copied the original file, general.php But no change.
Guest Posted July 19, 2004 Posted July 19, 2004 im having this problem too, anyone an idea whats causing it? This is the error Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/****/public_html/includes/functions/general.php on line 42 Here is a snippet of code, from line 35 onwards, line 42 is marked. // Parse the data used in the html tags to ensure the tags will not break function tep_parse_input_field_data($data, $parse) { return strtr(trim($data), $parse); } function tep_output_string($string, $translate = false, $protected = false) { if ($protected == true) { return htmlspecialchars($string); //THIS IS LINE 42 } else { if ($translate == false) { return tep_parse_input_field_data($string, array('"' => '"')); } else { return tep_parse_input_field_data($string, $translate); } } }
badass Posted July 19, 2004 Author Posted July 19, 2004 Do you know wich contri you last used? Nobody here seems to know any sollution..
Guest Posted July 19, 2004 Posted July 19, 2004 I just fixed this without actually fixing it, which is weird. Basically since signing up as a customer (test account) with my address based in the UK, I set the store to only allow customers from Australia. When I changed my address to an AUS one, the error dissapeared, which was just weird.
badass Posted July 19, 2004 Author Posted July 19, 2004 well, it just worked for me to.. very weird.. But thanks man! B)
Guest Posted August 12, 2004 Posted August 12, 2004 Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/nexuspcc/public_html/catalog/includes/functions/general.php on line 42 I am getting that as well. In my case, it is in shopping_cart.php as I am using the shipping estimator. Nothing was done to cause this - it simply appeared out of the blue. :(
Guest Posted August 12, 2004 Posted August 12, 2004 There are posts on this all over the forums: http://www.oscommerce.com/forums/index.php?sho...=0entry396656 http://www.oscommerce.com/forums/index.php?sho...=0entry394514 http://www.oscommerce.com/forums/index.php?sho...=0entry385622 http://www.oscommerce.com/forums/index.php?sho...=0entry378134 but no solution ever mentioned.
Mark Evans Posted August 12, 2004 Posted August 12, 2004 I am getting that as well. In my case, it is in shopping_cart.php as I am using the shipping estimator. Nothing was done to cause this - it simply appeared out of the blue. :( Try contacting the contribution author or finding the support thread for the contribution. Mark Evans osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops) --------------------------------------- Software is like sex: It's better when it's free. (Linus Torvalds)
RojanUK Posted August 16, 2004 Posted August 16, 2004 It's not the contribution. I've got the problem as well and I'm not using that contribution. RojanUK
RojanUK Posted August 16, 2004 Posted August 16, 2004 Try contacting the contribution author or finding the support thread for the contribution. Not very encouraging to know that even an osC developer doesn't know the answer... *YIKES* :unsure: RojanUK
RojanUK Posted August 16, 2004 Posted August 16, 2004 I just fixed this without actually fixing it, which is weird. Basically since signing up as a customer (test account) with my address based in the UK, I set the store to only allow customers from Australia. When I changed my address to an AUS one, the error dissapeared, which was just weird. My site is setup to only accept customer from the UK. In fact, I've done away with the country pull-down menu completely and it has UK statically inserted. I've created a test account after that mod and it worked like a charm. Creating an account still isn't a problem. However when I try and buy something on every page during checkout the address is listed perfectly both in shipping and billing, exept for the order_confirmation page. Then the htmlspecialchars error pops up instead of the addresses that displayed perfectly on the previous pages. But since I've only got one country I don't see how your solution could help me though... :( RojanUK
Recommended Posts
Archived
This topic is now archived and is closed to further replies.