jjj0923 Posted March 20, 2007 Posted March 20, 2007 when I go to process a return from a customer (recently upgraded to php5 and made some other mods listed here in the forums) I am getting an error on order.php when we press the 'request' (submit) button at the bottom of the screen. the error we are getting is: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/sites/www.mysite.com/web/includes/classes/order.php on line 318 line 318 is the last line below: (any ideas???) if ($customer_id == 0) { global $pwa_array_customer, $pwa_array_address, $pwa_array_shipping; // customers address $country_query = tep_db_query("select c.countries_name, c.countries_iso_code_2, c.countries_iso_code_3, c.address_format_id, z.zone_name from " . TABLE_COUNTRIES . " c left join " . TABLE_ZONES . " z on z.zone_id = '" . intval($pwa_array_address['entry_zone_id']) . "' where countries_id = '" . intval($pwa_array_address['entry_country_id']) . "'"); $country = tep_db_fetch_array($country_query); $address = array_merge($country, array('customers_firstname' => $pwa_array_customer['customers_firstname'], 'customers_lastname' => $pwa_array_customer['customers_lastname'], 'entry_firstname' => $pwa_array_customer['customers_firstname'], 'entry_lastname' => $pwa_array_customer['customers_lastname'], 'customers_telephone' => $pwa_array_customer['customers_telephone'], 'customers_email_address' => $pwa_array_customer['customers_email_address'], 'customers_email_address_2' => $pwa_array_customer['customers_email_address_2'], 'entry_company' => (isset($pwa_array_address['entry_company'])? $pwa_array_address['entry_company']:''), 'entry_street_address' => $pwa_array_address['entry_street_address'], 'entry_suburb' => $pwa_array_address['entry_suburb'], 'entry_postcode' => $pwa_array_address['entry_postcode'], 'entry_city' => $pwa_array_address['entry_city'], 'entry_zone_id' => $pwa_array_address['entry_zone_id'], 'countries_id' => $pwa_array_address['entry_country_id'], 'entry_country_id' => $pwa_array_address['entry_country_id'], 'entry_state' => $pwa_array_address['entry_state']));
Guest Posted March 20, 2007 Posted March 20, 2007 means it could not locate the country and so the query return back nothing. Should not had happened in the first place but here is something you could try (it's really a hack and you should find why the pwa arguments aren't valid) right after this: $country = tep_db_fetch_array($country_query); add if( !is_array($country) ) { $country = array(); }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.