Skip to content

Commit

Permalink
fix: Fixed an issue with a change in Twig 3.12.0 (which is now used…
Browse files Browse the repository at this point in the history
… by Craft `5.4.0`) which would cause an exception to be thrown when rendering templates ([#44](#44))
  • Loading branch information
khalwat committed Sep 3, 2024
1 parent 8f17f42 commit 3aa6dbf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/web/twig/TemplateCommentsParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,11 @@ public function setParent(?Node $parent): void
$this->parent = $parent;
}

public function hasInheritance()
{
return $this->parent || 0 < count($this->traits);
}

public function getStream(): TokenStream
{
return $this->stream;
Expand Down

0 comments on commit 3aa6dbf

Please sign in to comment.