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:
authorpiwikjapan <yamachan@piwikjapan.org>2015-11-23 11:01:51 +0300
committerpiwikjapan <yamachan@piwikjapan.org>2015-11-23 11:01:51 +0300
commit82df9cbfe5af10b8de7429bb088b7f619bbc98c2 (patch)
tree94ae5cfeb9f376aa167217a14db31a5e927747c0
parent13295613614dd3bf3326b61ea5f00f4345dccfd5 (diff)
parentf6b646f0b544d714be1cadfd10b3477d7e474691 (diff)
Merge pull request #1 from piwikjapan/bugfix
PHP's function substr calls unreadable characters, because it cuts mu…
-rw-r--r--plugins/Referrers/Columns/ReferrerName.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/Referrers/Columns/ReferrerName.php b/plugins/Referrers/Columns/ReferrerName.php
index 7bdb0732a6..9f3d122bdf 100644
--- a/plugins/Referrers/Columns/ReferrerName.php
+++ b/plugins/Referrers/Columns/ReferrerName.php
@@ -38,10 +38,12 @@ class ReferrerName extends Base
$information = $this->getReferrerInformationFromRequest($request);
if (!empty($information['referer_name'])) {
-
- return substr($information['referer_name'], 0, 70);
+ if (function_exists('mb_substr')) {
+ return mb_substr($information['referer_name'], 0, 70, 'UTF-8');
+ } else {
+ return substr($information['referer_name'], 0, 70);
+ }
}
-
return $information['referer_name'];
}