diff --git a/gocart/controllers/secure.php b/gocart/controllers/secure.php index d4c74f98..f667946a 100644 --- a/gocart/controllers/secure.php +++ b/gocart/controllers/secure.php @@ -538,7 +538,9 @@ function address_form($id = 0) if($id==0) { //if there is no set ID, the get the zones of the first country in the countries menu - $data['zones_menu'] = $this->location_model->get_zones_menu(array_shift(array_keys($data['countries_menu']))); + $keys = array_keys($data['countries_menu']); + $shift = array_shift($keys); + $data['zones_menu'] = $this->location_model->get_zones_menu($shift); } else { $data['zones_menu'] = $this->location_model->get_zones_menu($data['country_id']); } @@ -609,4 +611,4 @@ function delete_address() $this->Customer_model->delete_address($id, $customer['id']); echo $id; } -} \ No newline at end of file +}