DriWashSolutions Posted July 12, 2012 Share Posted July 12, 2012 My host just upgraded to PHP V5.3, and now the checkout_confirmation.php routine gives the following error: Warning: trim() expects parameter 1 to be string, array given in /home/myhome/public_html/catalog/includes/functions/general.php on line 42 Line 42 is contains the following: // 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); I just checked the same routine for v2.3.1 and the code is the same. Anyone have a fix? John Skurka Link to comment Share on other sites More sharing options...
DriWashSolutions Posted July 30, 2012 Author Share Posted July 30, 2012 Anything? I can't be the only one getting this error... John Skurka Link to comment Share on other sites More sharing options...
♥FWR Media Posted July 31, 2012 Share Posted July 31, 2012 It is not an issue of osCommerce it must be an issue related to modifications made to osCommerce. It doesn't make sense to attempt to insert an array into a single input field. Therefore the function that parses the data to ensure the tags will not break ( tep_parse_input_field_data() ) does not expect an array. Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
DriWashSolutions Posted August 4, 2012 Author Share Posted August 4, 2012 It is not an issue of osCommerce it must be an issue related to modifications made to osCommerce. If it's not an osCommerce issue, and I'm running v2.2, how is it that the code for version 2.3.1 is exactly the same? John Skurka Link to comment Share on other sites More sharing options...
DriWashSolutions Posted August 4, 2012 Author Share Posted August 4, 2012 This is the piece of code that is causing the two lines of errors. This code is located around line 326 in my checkout_confirmation.php: if (is_array($payment_modules->modules)){ echo $payment_modules->process_button(); } If I comment the code out, the errors disappear, but then my CC processing does work. John Skurka Link to comment Share on other sites More sharing options...
♥FWR Media Posted August 4, 2012 Share Posted August 4, 2012 This is the piece of code that is causing the two lines of errors. This code is located around line 326 in my checkout_confirmation.php: if (is_array($payment_modules->modules)){ echo $payment_modules->process_button(); } If I comment the code out, the errors disappear, but then my CC processing does work. Well look at [my cc process]::process_button() then. Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.