Skip to content

Commit 50c44cc

Browse files
authored
Changed ensureUtf8Encoded to work with 0
I changed the function ensureUtf8Encoded so that it only returns an empty string when it is null.
1 parent 8b891bb commit 50c44cc

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
@@ -269,7 +269,7 @@ protected static function ensureMacroCompleted($macro)
269269
*/
270270
protected static function ensureUtf8Encoded($subject)
271271
{
272-
return $subject ? Text::toUTF8($subject) : '';
272+
return !is_null($subject) ? Text::toUTF8($subject) : '';
273273
}
274274

275275
/**

0 commit comments

Comments
 (0)