From d97d9a0a3711752271184a032250200b0f783c5a Mon Sep 17 00:00:00 2001 From: mattab Date: Mon, 15 Dec 2014 16:25:42 +1300 Subject: Use Common::mb_* proxies rather than direct mb_* access in case multibyte is disabled --- core/Tracker/PageUrl.php | 5 +++-- core/Tracker/Visit.php | 2 +- plugins/CustomAlerts | 2 +- plugins/QueuedTracking | 2 +- plugins/Referrers/Columns/Base.php | 6 +++--- tests/PHPUnit/UI | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/core/Tracker/PageUrl.php b/core/Tracker/PageUrl.php index 4174a3168f..be1c31cf00 100644 --- a/core/Tracker/PageUrl.php +++ b/core/Tracker/PageUrl.php @@ -157,7 +157,7 @@ class PageUrl } if (!empty($parsedUrl['host'])) { - $parsedUrl['host'] = mb_strtolower($parsedUrl['host'], 'UTF-8'); + $parsedUrl['host'] = Common::mb_strtolower($parsedUrl['host'], 'UTF-8'); } if (!empty($parsedUrl['fragment'])) { @@ -219,7 +219,8 @@ class PageUrl { if (is_string($value)) { $decoded = urldecode($value); - if (@mb_check_encoding($decoded, $encoding)) { + if (function_exists('mb_check_encoding') + && @mb_check_encoding($decoded, $encoding)) { $value = urlencode(mb_convert_encoding($decoded, 'UTF-8', $encoding)); } } diff --git a/core/Tracker/Visit.php b/core/Tracker/Visit.php index 4e108450b5..41db09e557 100644 --- a/core/Tracker/Visit.php +++ b/core/Tracker/Visit.php @@ -422,7 +422,7 @@ class Visit implements VisitInterface private static function toCanonicalHost($host) { - $hostLower = mb_strtolower($host, 'UTF-8'); + $hostLower = Common::mb_strtolower($host, 'UTF-8'); return str_replace('www.', '', $hostLower); } diff --git a/plugins/CustomAlerts b/plugins/CustomAlerts index 2f10c8b496..e886aa43f4 160000 --- a/plugins/CustomAlerts +++ b/plugins/CustomAlerts @@ -1 +1 @@ -Subproject commit 2f10c8b496252d1527a47864cf39d18b359b7ae3 +Subproject commit e886aa43f4c248bf6aaeeef05885f4acdf190a82 diff --git a/plugins/QueuedTracking b/plugins/QueuedTracking index b64788b4b7..f73280a649 160000 --- a/plugins/QueuedTracking +++ b/plugins/QueuedTracking @@ -1 +1 @@ -Subproject commit b64788b4b7a6286d8c3bc612fabc8e38c9391c2d +Subproject commit f73280a649974a2b0882f1606f732057cee50dc5 diff --git a/plugins/Referrers/Columns/Base.php b/plugins/Referrers/Columns/Base.php index 5e8c186af8..feacc90e55 100644 --- a/plugins/Referrers/Columns/Base.php +++ b/plugins/Referrers/Columns/Base.php @@ -236,8 +236,8 @@ abstract class Base extends VisitDimension if (!empty($this->referrerHost)) { // is the referrer host the current host? if (isset($this->currentUrlParse['host'])) { - $currentHost = mb_strtolower($this->currentUrlParse['host'], 'UTF-8'); - if ($currentHost == mb_strtolower($this->referrerHost, 'UTF-8')) { + $currentHost = Common::mb_strtolower($this->currentUrlParse['host'], 'UTF-8'); + if ($currentHost == Common::mb_strtolower($this->referrerHost, 'UTF-8')) { $this->typeReferrerAnalyzed = Common::REFERRER_TYPE_DIRECT_ENTRY; return true; } @@ -426,4 +426,4 @@ abstract class Base extends VisitDimension { return $visitor->getVisitorColumn('referer_type') == $referrerType; } -} \ No newline at end of file +} diff --git a/tests/PHPUnit/UI b/tests/PHPUnit/UI index 0165dcc57e..4cdf80fc99 160000 --- a/tests/PHPUnit/UI +++ b/tests/PHPUnit/UI @@ -1 +1 @@ -Subproject commit 0165dcc57e66d0dfdeb2ff6bb2905e125fde722c +Subproject commit 4cdf80fc99025b71e5d8e59419d2af749e466df6 -- cgit v1.2.3