Skip to content

Commit

Permalink
Attempt to fix PHP Fatal error: Uncaught TypeError: htmlspecialchars(…
Browse files Browse the repository at this point in the history
…): Argument seboettg#1 ($string) must be of type string, array given

CF issue seboettg#184 seboettg#184

Signed-off-by: Raphaël Tournoy <rtournoy@users.noreply.github.com>
  • Loading branch information
rtournoy committed Aug 20, 2024
1 parent 0a5cce7 commit 6361a44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Rendering/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ private function renderVariable($data, $lang)
}
return $this->applyTextCase(
StringHelper::clearApostrophes(
htmlspecialchars($value, ENT_HTML5)
htmlspecialchars(gettype($value) === "string" ? $value : implode(';', $value), ENT_HTML5)
),
$lang
);
Expand Down

0 comments on commit 6361a44

Please sign in to comment.