mirror of
https://github.com/twigphp/Twig.git
synced 2026-11-03 17:45:15 +00:00
Check that the use tag is allowed before resolving trait templates
This commit is contained in:
@@ -218,7 +218,8 @@ final class ModuleNode extends Node implements CoercesChildrenToStringInterface
|
||||
|
||||
$countTraits = \count($this->getNode('traits'));
|
||||
if ($countTraits) {
|
||||
// traits
|
||||
$compiler->write("\$this->ensureTraitsAllowed();\n\n");
|
||||
|
||||
foreach ($this->getNode('traits') as $i => $trait) {
|
||||
$node = $trait->getNode('template');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user