Index: uc_location.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_location/uc_location.module,v
retrieving revision 1.3
diff -u -p -r1.3 uc_location.module
--- uc_location.module	9 Oct 2009 16:27:45 -0000	1.3
+++ uc_location.module	13 Oct 2009 10:42:02 -0000
@@ -94,8 +94,13 @@ function uc_location_form_uc_cart_checko
       drupal_add_js(drupal_get_path('module', 'uc_location') .'/uc_location.js');
       
       // Create book icon and address list.
-      $address_book_icon = l(uc_store_get_icon('file:address_book', FALSE, 'address-book-icon'), 
-        'user/'. $user->uid .'/edit', array('html' => TRUE));
+      if (user_access('set own user location')) {
+        $address_book_icon = l(uc_store_get_icon('file:address_book', FALSE, 'address-book-icon'),
+          'user/'. $user->uid .'/edit', array('html' => TRUE));
+      }
+      else {
+        $address_book_icon = '';
+      }
       $address_list = _uc_location_create_address_list($user->locations);
 
       if ($is_billable) {
@@ -230,7 +235,7 @@ function _uc_location_to_uc_address(&$lo
   $address['zone'] = $location['province_name'];
   $address['postal_code'] = $location['postal_code'];
   $address['country'] = $location['country_name'];
-  $address['phone'] = $location['phone'];
+  $address['phone'] = isset($location['phone']) ? $location['phone'] : '';
   
   return $address;
 }
@@ -332,7 +337,7 @@ function _uc_location_order_to_location(
   // If query returns false instead of of query object, create object with code and empty name value.
   if ($zone == FALSE) {
     $zone = (object) array(
-        'zone_code' => $order->{$type .'_zone'},
+        'zone_code' => $order->{$type .'_zone'} ? $order->{$type .'_zone'} : '',
         'zone_name' => '',
       );
   }
