diff options
author | Stefan Giehl <stefan@matomo.org> | 2022-08-08 02:57:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-08 02:57:03 +0300 |
commit | a8338460fd9883e5458db31b24ca399fef99ba71 (patch) | |
tree | 72a1b50040829562d3bfe922e7692f9e2e205041 /core | |
parent | ffb210bc547b7f42d77080c7ff44aa218c8a30f3 (diff) |
update szymach/c-pchart (#19604)
* update szymach/c-pchart
* fix php8.1 deprecation notice
Diffstat (limited to 'core')
-rw-r--r-- | core/DataTable/Renderer/Csv.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/core/DataTable/Renderer/Csv.php b/core/DataTable/Renderer/Csv.php index c177160955..2de46c9b69 100644 --- a/core/DataTable/Renderer/Csv.php +++ b/core/DataTable/Renderer/Csv.php @@ -239,13 +239,12 @@ class Csv extends Renderer $value = $this->formatFormulas($value); - $value = str_replace(["\t"], ' ', $value); + if (is_string($value)) { + $value = str_replace(["\t"], ' ', $value); - if (is_string($value) - && (strpos($value, '"') !== false - || strpos($value, $this->separator) !== false) - ) { - $value = '"' . str_replace('"', '""', $value) . '"'; + if (strpos($value, '"') !== false || strpos($value, $this->separator) !== false) { + $value = '"' . str_replace('"', '""', $value) . '"'; + } } // in some number formats (e.g. German), the decimal separator is a comma |