From 25cbe5eb58bb3c244fbd894748f12847d019e29c Mon Sep 17 00:00:00 2001 From: Oli Mortimer Date: Wed, 20 Sep 2017 19:50:28 +0100 Subject: [PATCH] Only variables should be passed by reference Fixes 'Only variables should be passed by reference' notice --- gocart/controllers/secure.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 +}