New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
batch filter clobbers array keys when fill parameter is used #2568
Labels
Comments
Hi and thanks for reporting! Could you maybe create a small twig fiddle to illustrate the issue? |
Here ya go! Let me know if there's anything else I can help with. |
fixed by #2884 |
fabpot
added a commit
that referenced
this issue
Mar 12, 2019
…s used " (fabpot) This PR was squashed before being merged into the 1.x branch (closes #2884). Discussion ---------- Fix "batch filter clobbers array keys when fill parameter is used " closes #2568 Commits ------- 750cb23 fixed batch filter clobbers array keys when fill parameter is used ede9a60 added preserveKeys support for the batch filter
Why has it been fixed? There is nothing in the documentation about the keys: https://twig.symfony.com/doc/2.x/filters/batch.html The values of the keys are undefined, based on the documentation. Your fix is a breaking change. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
batch filter clobbers array keys when fill parameter is used
On the last array chunk if there are fewer keys than the chuck size when the batch filter fills in the missing value it re-numbers the array keys.
The text was updated successfully, but these errors were encountered: