From c37ab434fafc875dc0185186448797779252a8a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.chilliet@fusiondirectory.org> Date: Tue, 5 Nov 2019 11:08:34 +0100 Subject: [PATCH] :ambulance: fix(msgPool) Fix too strong typing in msgPool issue #6047 --- include/class_msgPool.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/class_msgPool.inc b/include/class_msgPool.inc index a691a6ca8..186d60b55 100644 --- a/include/class_msgPool.inc +++ b/include/class_msgPool.inc @@ -426,8 +426,11 @@ class msgPool * * \param string $example Example of a right submited data */ - public static function invalid (string $name, string $data = '', string $example = ''): string + public static function invalid (string $name, $data = '', string $example = ''): string { + if (!is_string($data)) { + $data = var_export($data, TRUE); + } $error = sprintf(_('The field "%s" contains an invalid value.'), htmlentities($name, ENT_COMPAT, 'UTF-8')); $error .= '<br/><br/> "'.htmlentities($data, ENT_COMPAT, 'UTF-8').'"'; -- GitLab