Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2021-11-11 22:09:28 +0300
committerGitHub <noreply@github.com>2021-11-11 22:09:28 +0300
commit1e4af959702fb184001db899bfb6ac5f8c12c85a (patch)
tree5b3b351314cc78bf4c38bc0713736e9360f1594e /plugins/GeoIp2
parent680ac30b2078ce7f0fb587c145161dab0bce2c24 (diff)
Avoid further deprecation warnings on PHP 8.1 (#18293)
Diffstat (limited to 'plugins/GeoIp2')
-rw-r--r--plugins/GeoIp2/LocationProvider/GeoIp2/Php.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php b/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php
index f114870768..238782a0f0 100644
--- a/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php
+++ b/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php
@@ -239,8 +239,8 @@ class Php extends GeoIp2
protected function setCountryResults($lookupResult, &$result)
{
$result[self::CONTINENT_NAME_KEY] = $lookupResult->continent->name;
- $result[self::CONTINENT_CODE_KEY] = strtoupper($lookupResult->continent->code);
- $result[self::COUNTRY_CODE_KEY] = strtoupper($lookupResult->country->isoCode);
+ $result[self::CONTINENT_CODE_KEY] = strtoupper($lookupResult->continent->code ?? '');
+ $result[self::COUNTRY_CODE_KEY] = strtoupper($lookupResult->country->isoCode ?? '');
$result[self::COUNTRY_NAME_KEY] = $lookupResult->country->name;
}