Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

477
 
1699
 
1699
 
checkout_shipping.php
_> 3030     $sendto = $customer_default_address_id;
  3131   } else {
  3232 // verify the selected shipping address
<> 33 -    $check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$sendto . "'");
  34 -    $check_address = tep_db_fetch_array($check_address_query);
   33+    if ( (is_array($sendto) && empty($sendto)) || is_numeric($sendto) ) {
   34+      $check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$sendto . "'");
   35+      $check_address = tep_db_fetch_array($check_address_query);
3536 
<> 36 -    if ($check_address['total'] != '1') {
  37 -      $sendto = $customer_default_address_id;
  38 -      if (tep_session_is_registered('shipping')) tep_session_unregister('shipping');
   37+      if ($check_address['total'] != '1') {
   38+        $sendto = $customer_default_address_id;
   39+        if (tep_session_is_registered('shipping')) tep_session_unregister('shipping');
   40+      }
<_ 3941     }
  4042   }
  4143