Break the references in foreach within TemplateProcessor

This commit is contained in:
Dmitry Lukashin 2017-10-19 19:02:26 +03:00 committed by GitHub
parent 0beeb275fe
commit 7792eb2769
1 changed files with 3 additions and 0 deletions

View File

@ -138,6 +138,7 @@ class TemplateProcessor
foreach ($xml as &$item) {
$item = $this->transformSingleXml($item, $xsltProcessor);
}
unset($item);
} else {
$xml = $this->transformSingleXml($xml, $xsltProcessor);
}
@ -214,6 +215,7 @@ class TemplateProcessor
foreach ($search as &$item) {
$item = self::ensureMacroCompleted($item);
}
unset($item);
} else {
$search = self::ensureMacroCompleted($search);
}
@ -222,6 +224,7 @@ class TemplateProcessor
foreach ($replace as &$item) {
$item = self::ensureUtf8Encoded($item);
}
unset($item);
} else {
$replace = self::ensureUtf8Encoded($replace);
}