Merge pull request #1162 from abcdmitry/patch-2
Break the references in foreach within TemplateProcessor
This commit is contained in:
commit
a4b532083b
|
|
@ -174,6 +174,7 @@ class TemplateProcessor
|
||||||
foreach ($xml as &$item) {
|
foreach ($xml as &$item) {
|
||||||
$item = $this->transformSingleXml($item, $xsltProcessor);
|
$item = $this->transformSingleXml($item, $xsltProcessor);
|
||||||
}
|
}
|
||||||
|
unset($item);
|
||||||
} else {
|
} else {
|
||||||
$xml = $this->transformSingleXml($xml, $xsltProcessor);
|
$xml = $this->transformSingleXml($xml, $xsltProcessor);
|
||||||
}
|
}
|
||||||
|
|
@ -246,6 +247,7 @@ class TemplateProcessor
|
||||||
foreach ($search as &$item) {
|
foreach ($search as &$item) {
|
||||||
$item = static::ensureMacroCompleted($item);
|
$item = static::ensureMacroCompleted($item);
|
||||||
}
|
}
|
||||||
|
unset($item);
|
||||||
} else {
|
} else {
|
||||||
$search = static::ensureMacroCompleted($search);
|
$search = static::ensureMacroCompleted($search);
|
||||||
}
|
}
|
||||||
|
|
@ -254,6 +256,7 @@ class TemplateProcessor
|
||||||
foreach ($replace as &$item) {
|
foreach ($replace as &$item) {
|
||||||
$item = static::ensureUtf8Encoded($item);
|
$item = static::ensureUtf8Encoded($item);
|
||||||
}
|
}
|
||||||
|
unset($item);
|
||||||
} else {
|
} else {
|
||||||
$replace = static::ensureUtf8Encoded($replace);
|
$replace = static::ensureUtf8Encoded($replace);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue