negativeexistence Posted February 22, 2014 Posted February 22, 2014 Hello, When I altered my usps shipping info and selected save I get: Warning: addslashes() expects parameter 1 to be string, array given in /home/negative/public_html/snowdenguitars/admin/modules.php on line 38 Warning: addslashes() expects parameter 1 to be string, array given in /home/negative/public_html/snowdenguitars/admin/modules.php on line 38 Warning: addslashes() expects parameter 1 to be string, array given in /home/negative/public_html/snowdenguitars/admin/modules.php on line 38 Warning: Cannot modify header information - headers already sent by (output started at /home/negative/public_html/snowdenguitars/admin/modules.php:38) in /home/negative/public_html/snowdenguitars/admin/includes/functions/general.php on line 34 any ideas? Thanks, -Alex
negativeexistence Posted February 22, 2014 Author Posted February 22, 2014 btw 38 is tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . addslashes( addslashes( $value ) ) . "' where configuration_key = '" . $key . "'");
Jack_mcs Posted February 22, 2014 Posted February 22, 2014 I don't know if it is your problem but I don't think there should be two addslashes commands in that statement. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
negativeexistence Posted February 22, 2014 Author Posted February 22, 2014 @@Jack_mcs - thanks for the input but after removing an addslashes I still get the warning...
Jack_mcs Posted February 22, 2014 Posted February 22, 2014 When you say you altered the info, I assume you mean you made some text changes. If so, such a problem shouldn't happen. I suggest you remove whatever changes you made and make sure the module works and that you can edit and save. If you can't then there is some other problem. If you can, then try your changes again one at a time and when it fails, post the before and after code here with a description of what was done. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
negativeexistence Posted February 22, 2014 Author Posted February 22, 2014 Before: tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . addslashes( addslashes( $value ) ) . "' where configuration_key = '" . $key . "'"); Atempted change with same warning message: tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . addslashes( $value ) . "' where configuration_key = '" . $key . "'"); Since it didn't work, I changed it back. Does the "addslashes() expects parameter 1 to be string, array given in" indicate the database needs to be changed to accept arrays rather than strings?
Jack_mcs Posted February 23, 2014 Posted February 23, 2014 No, I was referring to your changes, not the one I mentioned. You originally said, "When I altered my usps shipping..." If you remove that change, whatever it was, does the code work? Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
negativeexistence Posted February 23, 2014 Author Posted February 23, 2014 when I altered the usps shipping settings in admin (I should have been clearer). Thanks! I have resolved my problem... it was an outdated usps.php file.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.