diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-12-15 06:25:42 +0300 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-12-15 06:25:42 +0300 |
commit | d97d9a0a3711752271184a032250200b0f783c5a (patch) | |
tree | 04e64c9bd9e81f802d0fe9a5a6156ed9e62d372b | |
parent | 6f5e4bc1f58acf1ecd63a39340265b72be954574 (diff) |
Use Common::mb_* proxies rather than direct mb_* access in case multibyte is disabled
-rw-r--r-- | core/Tracker/PageUrl.php | 5 | ||||
-rw-r--r-- | core/Tracker/Visit.php | 2 | ||||
m--------- | plugins/CustomAlerts | 0 | ||||
m--------- | plugins/QueuedTracking | 0 | ||||
-rw-r--r-- | plugins/Referrers/Columns/Base.php | 6 | ||||
m--------- | tests/PHPUnit/UI | 0 |
6 files changed, 7 insertions, 6 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 -Subproject 2f10c8b496252d1527a47864cf39d18b359b7ae +Subproject e886aa43f4c248bf6aaeeef05885f4acdf190a8 diff --git a/plugins/QueuedTracking b/plugins/QueuedTracking -Subproject b64788b4b7a6286d8c3bc612fabc8e38c9391c2 +Subproject f73280a649974a2b0882f1606f732057cee50dc 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 -Subproject 0165dcc57e66d0dfdeb2ff6bb2905e125fde722 +Subproject 4cdf80fc99025b71e5d8e59419d2af749e466df |