Skip to content

Commit 83b0bef

Browse files
committed
Fix #2290
1 parent a006aa8 commit 83b0bef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpWord/TemplateProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ protected static function ensureMacroCompleted($macro)
257257
*/
258258
protected static function ensureUtf8Encoded($subject)
259259
{
260-
if (!Text::isUTF8($subject)) {
260+
if (!Text::isUTF8($subject) && !is_null($subject)) {
261261
$subject = utf8_encode($subject);
262262
}
263263

0 commit comments

Comments
 (0)