We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 52b111a commit b53a9beCopy full SHA for b53a9be
src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php
@@ -164,9 +164,12 @@ private function getReadDomainFromNode(Node $node): ?string
164
) {
165
$nodeArguments = $node->getNode('arguments');
166
if ($nodeArguments->getIterator()->current() instanceof ConstantExpression) {
167
- $value = \constant($nodeArguments->getIterator()->current()->getAttribute('value'));
168
- if (\is_string($value)) {
169
- return $value;
+ $constantName = $nodeArguments->getIterator()->current()->getAttribute('value');
+ if (\defined($constantName)) {
+ $value = \constant($constantName);
170
+ if (\is_string($value)) {
171
+ return $value;
172
+ }
173
}
174
175
0 commit comments