From fbb05a321808c598e26b8b6ef8533ee78bde26fb Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Sat, 16 Nov 2024 19:38:18 -0800 Subject: [PATCH] Fixed #16107 --- CHANGELOG.md | 2 ++ src/web/twig/nodes/GetAttrNode.php | 5 ++--- src/web/twig/nodevisitors/GetAttrAdjuster.php | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46b029d41d5..d7e9acef03b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,9 @@ # Release Notes for Craft CMS 4 ## Unreleased + - Fixed a JavaScript error that could occur on element edit pages. ([#16055](https://github.com/craftcms/cms/issues/16055)) +- Fixed a Twig deprecation error. ([#16107](https://github.com/craftcms/cms/issues/16107)) ## 4.13.0 - 2024-11-12 diff --git a/src/web/twig/nodes/GetAttrNode.php b/src/web/twig/nodes/GetAttrNode.php index 5982f702d15..f4bb9f9f2e6 100644 --- a/src/web/twig/nodes/GetAttrNode.php +++ b/src/web/twig/nodes/GetAttrNode.php @@ -27,13 +27,12 @@ class GetAttrNode extends GetAttrExpression * @param array $nodes An array of named nodes * @param array $attributes An array of attributes (should not be nodes) * @param int $lineno The line number - * @param string|null $tag The tag name associated with the Node * @noinspection PhpMissingParentConstructorInspection */ - public function __construct(array $nodes = [], array $attributes = [], int $lineno = 0, ?string $tag = null) + public function __construct(array $nodes = [], array $attributes = [], int $lineno = 0) { // Skip parent::__construct() - Node::__construct($nodes, $attributes, $lineno, $tag); + Node::__construct($nodes, $attributes, $lineno); } /** diff --git a/src/web/twig/nodevisitors/GetAttrAdjuster.php b/src/web/twig/nodevisitors/GetAttrAdjuster.php index f50aa2051a6..412f260b2e8 100644 --- a/src/web/twig/nodevisitors/GetAttrAdjuster.php +++ b/src/web/twig/nodevisitors/GetAttrAdjuster.php @@ -52,7 +52,7 @@ public function enterNode(Node $node, Environment $env): Node $attributes['spread'] = $node->getAttribute('spread'); } - return new GetAttrNode($nodes, $attributes, $node->getTemplateLine(), $node->getNodeTag()); + return new GetAttrNode($nodes, $attributes, $node->getTemplateLine()); } /**