Fix : htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated

htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated
This commit is contained in:
neopheus 2022-09-12 13:48:13 +02:00
parent 83b0bef3a8
commit 077175efbe
1 changed files with 1 additions and 1 deletions

View File

@ -27,6 +27,6 @@ class Xml extends AbstractEscaper
protected function escapeSingleValue($input) protected function escapeSingleValue($input)
{ {
// todo: omit encoding parameter after migration onto PHP 5.4 // todo: omit encoding parameter after migration onto PHP 5.4
return htmlspecialchars($input, ENT_QUOTES, 'UTF-8'); return (!is_null($input)) ? htmlspecialchars($input, ENT_QUOTES, 'UTF-8') : null;
} }
} }