Index: oscommerce2/trunk/catalog/includes/functions/general.php =================================================================== diff -u -r1612 -r1699 --- oscommerce2/trunk/catalog/includes/functions/general.php (.../general.php) (revision 1612) +++ oscommerce2/trunk/catalog/includes/functions/general.php (.../general.php) (revision 1699) @@ -492,6 +492,10 @@ // Return a formatted address // TABLES: customers, address_book function tep_address_label($customers_id, $address_id = 1, $html = false, $boln = '', $eoln = "\n") { + if (is_array($address_id) && !empty($address_id)) { + return tep_address_format($address_id['address_format_id'], $address_id, $html, $boln, $eoln); + } + $address_query = tep_db_query("select entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customers_id . "' and address_book_id = '" . (int)$address_id . "'"); $address = tep_db_fetch_array($address_query);