We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d5b8f7 commit 21d0613Copy full SHA for 21d0613
src/HtmlTemplate.php
@@ -456,7 +456,13 @@ protected function parseTemplate(string $str): void
456
$this->tagTrees = [];
457
try {
458
$this->tagTrees[self::TOP_TAG] = $this->parseTemplateTree($inputReversed);
459
- self::$_parseCache[$cKey] = $this->tagTrees;
+ $tagTrees = $this->tagTrees;
460
+ \Closure::bind(function () use ($tagTrees) {
461
+ foreach ($tagTrees as $tagTree) {
462
+ $tagTree->parentTemplate = null; // @phpstan-ignore-line
463
+ }
464
+ }, null, TagTree::class)();
465
+ self::$_parseCache[$cKey] = $tagTrees;
466
} finally {
467
$this->tagTrees = null; // @phpstan-ignore-line
468
}
0 commit comments