File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,6 @@ class Xml extends AbstractEscaper
27
27
protected function escapeSingleValue ($ input )
28
28
{
29
29
// todo: omit encoding parameter after migration onto PHP 5.4
30
- return htmlspecialchars ($ input , ENT_QUOTES , 'UTF-8 ' );
30
+ return (! is_null ( $ input )) ? htmlspecialchars ($ input , ENT_QUOTES , 'UTF-8 ' ) : '' ;
31
31
}
32
32
}
Original file line number Diff line number Diff line change @@ -257,11 +257,11 @@ protected static function ensureMacroCompleted($macro)
257
257
*/
258
258
protected static function ensureUtf8Encoded ($ subject )
259
259
{
260
- if (!Text::isUTF8 ($ subject )) {
260
+ if (!Text::isUTF8 ($ subject ) && ! is_null ( $ subject ) ) {
261
261
$ subject = utf8_encode ($ subject );
262
262
}
263
263
264
- return $ subject ;
264
+ return (! is_null ( $ subject)) ? $ subject : '' ;
265
265
}
266
266
267
267
/**
You can’t perform that action at this time.
0 commit comments