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:
parent
83b0bef3a8
commit
077175efbe
|
|
@ -27,6 +27,6 @@ class Xml extends AbstractEscaper
|
|||
protected function escapeSingleValue($input)
|
||||
{
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue