The Pretender Posted December 7, 2003 Posted December 7, 2003 hi there i have this error on every user that want's to make an order to my site they get this al the time Does anyone know how to get rid of this error or any idea? thnx Warning: htmlspecialchars() expects parameter 1 to be string, array given in /catalog/includes/functions/general.php on line 42
jonarvid Posted December 10, 2003 Posted December 10, 2003 Go into /catalog/includes/funtions/database.php find this line : function teb_db_query add this line below: error_log('[QUERY] ' . $query . "\n"); And this one really works!!!
davidturetsky Posted December 12, 2003 Posted December 12, 2003 Tried this and the set primary default to true. Neither worked. What did work, the following change to create_account.php. Change this which is around line 212. tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'"); tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customer_id . "', '0', now())"); if (SESSION_RECREATE == 'True') { tep_session_recreate(); } $customer_first_name = $firstname; $customer_default_address_id = $address_id; To: tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '1' where customers_id = '" . (int)$customer_id . "'"); tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customer_id . "', '0', now())"); if (SESSION_RECREATE == 'True') { tep_session_recreate(); } $customer_first_name = $firstname; $customer_default_address_id = '1'; Works for me on a live site... Cannot believe that I had to hard-code that though.
EricK Posted December 15, 2003 Posted December 15, 2003 I installed Purchase Without Account, and if a space is used in Street or City address fields on Order_Info.php then "sometimes" this error occurs and nothing shows except "," for the Shipping or Billing Address. checkout_confirmation.php - error message ============================================== Billing Address (Edit) Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/username/mydomain-www/catalog/includes/functions/general.php on line 54 Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/username/mydomain-www/catalog/includes/functions/general.php on line 54 =============================================== my line 54 in general.php is return htmlspecialchars($string); Has anybody else using PWA seen :( or solved :) this bug? The solutions I've found in the forums and bug reports don't seem to apply to PWA... Any suggestions are appreciated. Thanks, EricK
Guest Posted May 18, 2004 Posted May 18, 2004 I am having same issue Delivery Address (Edit) Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/sensatio/public_html/home/includes/functions/general.php on line 42 Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/sensatio/public_html/home/includes/functions/general.php on line 42 I intalled checkout without and account :o
Guest Posted May 20, 2004 Posted May 20, 2004 Tried this and the set primary default to true. Neither worked. What did work, the following change to create_account.php. Change this which is around line 212. ? ? ?tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'"); ? ? ?tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customer_id . "', '0', now())"); ? ? ?if (SESSION_RECREATE == 'True') { ? ? ? ?tep_session_recreate(); ? ? ?} ? ? ?$customer_first_name = $firstname; ? ? ?$customer_default_address_id = $address_id; To: ? ? ?tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '1' where customers_id = '" . (int)$customer_id . "'"); ? ? ?tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customer_id . "', '0', now())"); ? ? ?if (SESSION_RECREATE == 'True') { ? ? ? ?tep_session_recreate(); ? ? ?} ? ? ?$customer_first_name = $firstname; ? ? ?$customer_default_address_id = '1'; Works for me on a live site... Cannot believe that I had to hard-code that though. I follow this method, but it still has problem. It should be occur problem when the user account use " ; , ' <== this symbol
Recommended Posts
Archived
This topic is now archived and is closed to further replies.