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
The merge filter only works with arrays or "Traversable", got "integer" for argument 2
Even though I suspect that internally TwigPHP depends on the merge filter to implement the spread operator, it is still wrong that the error message mentions a filter that is not used in the template.
The error message should be related to the code actually present and should be something like 5 is not iterable or 5 is neither an array nor a "Traversable".
The text was updated successfully, but these errors were encountered:
ericmorand
changed the title
Error The merge filter only works with arrays or "Traversable", got "integer" for argument 2 while not using the merge filter
Error The merge filter only works with arrays or "Traversable", got "integer" for argument 2 when not using the merge filter
Dec 2, 2023
Whenever we try to spread an integer, we get this error about the
merge
filter.https://twigfiddle.com/ud26jf
Even though I suspect that internally TwigPHP depends on the merge filter to implement the spread operator, it is still wrong that the error message mentions a filter that is not used in the template.
The error message should be related to the code actually present and should be something like
5 is not iterable
or5 is neither an array nor a "Traversable"
.The text was updated successfully, but these errors were encountered: