From 20a3c31396efef9c2975f91282ce9496be2263cf Mon Sep 17 00:00:00 2001 From: Lukas Winkler Date: Fri, 4 Sep 2020 13:35:42 +0200 Subject: [PATCH] use correct IP (non-binary) see #2 --- ExcludeCountries.php | 2 +- plugin.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ExcludeCountries.php b/ExcludeCountries.php index e957407..598779e 100644 --- a/ExcludeCountries.php +++ b/ExcludeCountries.php @@ -43,7 +43,7 @@ class ExcludeCountries extends Plugin $settings = new SystemSettings(); - $location = $provider->getLocation(["ip" => $request->getIp()]); + $location = $provider->getLocation(["ip" => $request->getIpString()]); $countryCode = strtolower($location[LocationProvider::COUNTRY_CODE_KEY]); if (!$location || empty($countryCode)) { $logger->debug("ExcludeCountries could not detect a location"); diff --git a/plugin.json b/plugin.json index 48d1023..64c1295 100644 --- a/plugin.json +++ b/plugin.json @@ -1,7 +1,7 @@ { "name": "ExcludeCountries", "description": "Exclude or include visitors from selected countries", - "version": "0.1.4", + "version": "0.1.5", "theme": false, "require": { "piwik": ">=3.10.0,<4.0.0-b1"