From 56693da6e0264bcc0d6c97f8ec8f04db00bec5c5 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Wed, 23 Oct 2013 19:02:13 +0200 Subject: [PATCH] // remove warning Notice: Undefined variable: connections in AdminCustomersController.php on line 702 --- controllers/admin/AdminCustomersController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/controllers/admin/AdminCustomersController.php b/controllers/admin/AdminCustomersController.php index 33f1282f8..3a15323f2 100644 --- a/controllers/admin/AdminCustomersController.php +++ b/controllers/admin/AdminCustomersController.php @@ -646,6 +646,8 @@ class AdminCustomersControllerCore extends AdminController } $connections = $customer->getLastConnections(); + if (!is_array($connections)) + $connections = array(); $total_connections = count($connections); for ($i = 0; $i < $total_connections; $i++) { @@ -654,7 +656,7 @@ class AdminCustomersControllerCore extends AdminController preg_replace('/^www./', '', parse_url($connections[$i]['http_referer'], PHP_URL_HOST)) : $this->l('Direct link'); } - + $referrers = Referrer::getReferrers($customer->id); $total_referrers = count($referrers); for ($i = 0; $i < $total_referrers; $i++)