Skip to content

Attribute "value" does not exist for Node "Twig\Node\Expression\FunctionExpression" #2

Description

@steevanb

Hi,

Thanks for your awesome extension, i will never understand why it's not in Twig...

But i have this error:
2024-04-13_17h46_59

With this code in my twig template:

{% if move is instanceof(getAttackFqcn()) %}

Here is the dump before the exception is throwned:

# vendor/twig/twig/src/Node/Node.php
    public function getAttribute(string $name)
    {
        if (!\array_key_exists($name, $this->attributes)) {
            dd($this->attributes);
            throw new \LogicException(sprintf('Attribute "%s" does not exist for Node "%s".', $name, static::class));
        }

        return $this->attributes[$name];
    }
^ array:2 [
  "name" => "getAttackFqcn"
  "is_defined_test" => false
]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions