diff options
author | Stefan Giehl <stefan@matomo.org> | 2021-11-11 22:09:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-11 22:09:28 +0300 |
commit | 1e4af959702fb184001db899bfb6ac5f8c12c85a (patch) | |
tree | 5b3b351314cc78bf4c38bc0713736e9360f1594e /plugins/GeoIp2 | |
parent | 680ac30b2078ce7f0fb587c145161dab0bce2c24 (diff) |
Avoid further deprecation warnings on PHP 8.1 (#18293)
Diffstat (limited to 'plugins/GeoIp2')
-rw-r--r-- | plugins/GeoIp2/LocationProvider/GeoIp2/Php.php | 4 |
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; } |