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:
authorStefan Giehl <stefan@matomo.org>2021-12-07 22:44:01 +0300
committerGitHub <noreply@github.com>2021-12-07 22:44:01 +0300
commit4f5cda954a6b64677f9b48223a91e0ec8785e055 (patch)
treef1ff518dc59ac88c2e30448dee56fe1b7ab656a3 /core/Twig.php
parentcd2cd0c041e25817a7887d7dcc7dfc6d232b9788 (diff)
Fix 'Call to undefined function Piwik\piwik_fix_lbrace()' (#18461)
Diffstat (limited to 'core/Twig.php')
-rw-r--r--core/Twig.php21
1 files changed, 1 insertions, 20 deletions
diff --git a/core/Twig.php b/core/Twig.php
index e5b5e24958..abf3549af2 100644
--- a/core/Twig.php
+++ b/core/Twig.php
@@ -42,26 +42,7 @@ function piwik_format_number($string, $minFractionDigits, $maxFractionDigits)
function piwik_fix_lbrace($string)
{
- $chars = array('{', '&#x7B;', '&#123;', '&lcub;', '&lbrace;', '&#x0007B;');
-
- static $search;
- static $replace;
-
- if (!isset($search)) {
- $search = array_map(function ($val) { return $val . $val; }, $chars);
- }
- if (!isset($replace)) {
- $replace = array_map(function ($val) { return $val . '&#8291;' . $val; }, $chars);
- }
-
- $replacedString = is_null($string) ? $string : str_replace($search, $replace, $string);
-
- // try to replace characters until there are no changes
- if ($string !== $replacedString) {
- return piwik_fix_lbrace($replacedString);
- }
-
- return $string;
+ return Common::fixLbrace($string);
}
function piwik_escape_filter(Environment $env, $string, $strategy = 'html', $charset = null, $autoescape = false) {