Skip to content

Commit

Permalink
Merge #16581 - Fix PHP Uncaught TypeError: htmlspecialchars()
Browse files Browse the repository at this point in the history
Pull-request: #16581

Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Jan 28, 2021
2 parents a5fd6b6 + 21d7cc5 commit dc14f76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/classes/Config/FormDisplayTemplate.php
Expand Up @@ -277,7 +277,7 @@ public function displayInput(
// 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)
. '">';
Expand Down

0 comments on commit dc14f76

Please sign in to comment.