diff options
author | Stefan Giehl <stefan@matomo.org> | 2021-05-27 04:58:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-27 04:58:30 +0300 |
commit | c973567705a0065fdd7d7c7b11b80f1f0f1be350 (patch) | |
tree | 89947dbce864ac48389c742fce31d30106eebada /plugins/GeoIp2 | |
parent | 70b05de003487a31495bb9927017606a2faab7dd (diff) |
Update PHP extension requirements & deprecate Common::mb_* methods (#16754)
* Require polyfill for mbstring and iconv
* remove mbstring methods from upgrade.php
* remove checks for some php extensions
* deprecate Common::mb_* methods, as we can directly use mb_* functions instead
* updates expected test files
* Directly use mb_* methods in favor of Common::mb_*
* Update expected screenshot
Co-authored-by: diosmosis <diosmosis@users.noreply.github.com>
Diffstat (limited to 'plugins/GeoIp2')
-rw-r--r-- | plugins/GeoIp2/GeoIP2AutoUpdater.php | 2 | ||||
-rw-r--r-- | plugins/GeoIp2/LocationProvider/GeoIp2/Php.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/GeoIp2/GeoIP2AutoUpdater.php b/plugins/GeoIp2/GeoIP2AutoUpdater.php index 90bc42ecc7..29bcafd975 100644 --- a/plugins/GeoIp2/GeoIP2AutoUpdater.php +++ b/plugins/GeoIp2/GeoIP2AutoUpdater.php @@ -463,7 +463,7 @@ class GeoIP2AutoUpdater extends Task $schema = $parsedUrl['scheme'] ?? ''; $host = $parsedUrl['host'] ?? ''; - if (empty($schema) || empty($host) || !in_array(Common::mb_strtolower($schema), ['http', 'https'])) { + if (empty($schema) || empty($host) || !in_array(mb_strtolower($schema), ['http', 'https'])) { throw new Exception(Piwik::translate('GeoIp2_MalFormedUpdateUrl', '<i>'.Common::sanitizeInputValue($url).'</i>')); } diff --git a/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php b/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php index 3bf1496d02..af73b1624c 100644 --- a/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php +++ b/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php @@ -274,7 +274,7 @@ class Php extends GeoIp2 } foreach ($regionNames[$countryCode] as $isoCode => $name) { - if (Common::mb_strtolower($name) === Common::mb_strtolower($regionName)) { + if (mb_strtolower($name) === mb_strtolower($regionName)) { return $isoCode; } } |