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
path: root/core
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2022-01-26 22:13:09 +0300
committerGitHub <noreply@github.com>2022-01-26 22:13:09 +0300
commitc4f5733ebef7e59bbc78a9bbae1e2b51fb9a3b83 (patch)
treed7da3b358100e2765807480710d1dd88630b5243 /core
parent972bbb2af54a8cc371bea6f42e329c77395be198 (diff)
Fix possible error when generating PDF reports containing multibyte chars (#18664)
* Ensure strings are truncated correctly for PDF usage * Add some emojis to tests * updates expected test files
Diffstat (limited to 'core')
-rw-r--r--core/ReportRenderer/Pdf.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/ReportRenderer/Pdf.php b/core/ReportRenderer/Pdf.php
index ec72979ddb..d7ac33c9fb 100644
--- a/core/ReportRenderer/Pdf.php
+++ b/core/ReportRenderer/Pdf.php
@@ -377,7 +377,7 @@ class Pdf extends ReportRenderer
$posX = $this->TCPDF->GetX();
$posY = $this->TCPDF->GetY();
if (isset($rowMetrics[$columnId])) {
- $text = substr($rowMetrics[$columnId], 0, $this->truncateAfter);
+ $text = mb_substr($rowMetrics[$columnId], 0, $this->truncateAfter);
if ($isLogoDisplayable) {
$text = $leftSpacesBeforeLogo . $text;
}