From 13d68e2e07bda2df81fa3ed3697c90f9d4c84bc9 Mon Sep 17 00:00:00 2001 From: ralf Date: Fri, 5 Apr 2024 14:39:20 +0200 Subject: [PATCH] fix TypeError on InfoLog notification --- api/src/Storage/Tracking.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/src/Storage/Tracking.php b/api/src/Storage/Tracking.php index 65a304714a..3a88b50d2d 100644 --- a/api/src/Storage/Tracking.php +++ b/api/src/Storage/Tracking.php @@ -1161,6 +1161,12 @@ abstract class Tracking //error_log(__METHOD__.'('.array2string($html_mail).",'$type',".array2string($modified).",'$line',".array2string($data).')'); $content = ''; + if (is_array($data)) + { + error_log(__METHOD__."(".json_encode(func_get_args()).") data should be a string, no array!"); + $data = implode(', ', $data); + } + if ($html_mail) { if (!$this->html_content_allow) $line = Api\Html::htmlspecialchars($line); // XSS