You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have this line of code in Twig: user.roles.first.is(role) to truth check if I should set an option to selected. This should translate to $user->roles->first->is($role). But it seems to do something more in the ballpark of this $user->roles->first()->is($role)
This is what getAttribute resolves into:
This is what it should resolve into:
The text was updated successfully, but these errors were encountered:
I believe it goes bad on line 582 of Twig\Template. It does an isset check of the property. But since the HigherOrderCollectionProxy is created in the magic __get method of a Collection. It returns false and tries it as a function.
Allows `Collection` `Higher Order Message` feature to work. The issue is explained in
rcrowe#359 However this might create unwanted behavior. I'll explain further within the issue
I have created a possible solution to this issue, it actually does the same as what it does for a Model class objects. However this does mean that if you'd use to use something like this before: user.roles.first.name, it will now no longer work. You'd now have to write user.roles.first().name. So this might be unwanted.
I have this line of code in Twig:
user.roles.first.is(role)
to truth check if I should set an option to selected. This should translate to$user->roles->first->is($role)
. But it seems to do something more in the ballpark of this$user->roles->first()->is($role)
This is what getAttribute resolves into:

This is what it should resolve into:

The text was updated successfully, but these errors were encountered: