Merge #16581 - Fix PHP Uncaught TypeError: htmlspecialchars()

Pull-request: #16581

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2021-01-28 15:55:50 +01:00
commit dc14f7685b
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -277,7 +277,7 @@ class FormDisplayTemplate
// As seen in the reporting server (#15042) we sometimes receive
// an array here. No clue about its origin nor content, so let's avoid
// a notice on htmlspecialchars().
if (! is_array($value)) {
if (is_string($value)) {
$htmlOutput .= '<input type="text" size="25" ' . $nameId
. $fieldClass . ' value="' . htmlspecialchars($value)
. '">';