Skip to content

Commit 198165c

Browse files
authored
allow to override TemplateProcessor#ensureUtf8Encoded
the method is `protected`, but since it is called with `self` instead of `static` it does not allow for subclasses to override it
1 parent 4c9e750 commit 198165c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PhpWord/TemplateProcessor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,10 @@ public function setValue($search, $replace, $limit = self::MAXIMUM_REPLACEMENTS_
217217

218218
if (is_array($replace)) {
219219
foreach ($replace as &$item) {
220-
$item = self::ensureUtf8Encoded($item);
220+
$item = static::ensureUtf8Encoded($item);
221221
}
222222
} else {
223-
$replace = self::ensureUtf8Encoded($replace);
223+
$replace = static::ensureUtf8Encoded($replace);
224224
}
225225

226226
if (Settings::isOutputEscapingEnabled()) {

0 commit comments

Comments
 (0)