diff --git a/src/PhpWord/Escaper/Xml.php b/src/PhpWord/Escaper/Xml.php index a769c5e1..073e297d 100644 --- a/src/PhpWord/Escaper/Xml.php +++ b/src/PhpWord/Escaper/Xml.php @@ -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; } }