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:
authorsgiehl <stefan@matomo.org>2020-04-28 15:19:56 +0300
committersgiehl <stefan@matomo.org>2020-04-28 15:19:56 +0300
commitbed0c2659e174b9697ab30556b43e79dcea24ca3 (patch)
treea857a5110c492a0227088c1291509dfb489a2e9b /core/CronArchive.php
parent69a65613e645cbd153221ca1bbdd5d9d0e2b08b4 (diff)
parent1534367810d12bc9f50571d1dde02b153dae0d6a (diff)
Merge branch '3.x-dev' into 4.x-dev
Diffstat (limited to 'core/CronArchive.php')
-rw-r--r--core/CronArchive.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/CronArchive.php b/core/CronArchive.php
index a9a0a3839e..9413e9d179 100644
--- a/core/CronArchive.php
+++ b/core/CronArchive.php
@@ -1240,8 +1240,13 @@ class CronArchive
public function logError($m)
{
if (!defined('PIWIK_ARCHIVE_NO_TRUNCATE')) {
- $m = substr($m, 0, self::TRUNCATE_ERROR_MESSAGE_SUMMARY);
$m = str_replace(array("\n", "\t"), " ", $m);
+ if (Common::mb_strlen($m) > self::TRUNCATE_ERROR_MESSAGE_SUMMARY) {
+ $numCharactersKeepFromEnd = 100;
+ $m = Common::mb_substr($m, 0, self::TRUNCATE_ERROR_MESSAGE_SUMMARY - $numCharactersKeepFromEnd)
+ . ' ... ' .
+ Common::mb_substr($m, -1 * $numCharactersKeepFromEnd);
+ }
}
$this->errors[] = $m;
$this->logger->error($m);