fabpot/Twig — pull request #1401 by ureimers (2014-05-15 18:25:26+00:00)
Title: [Twig][Tests][Fixtures][filters] Added empty string tests for "first" and "last" filters

| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT

This was already fixed with with https://github.com/fabpot/Twig/commit/6003ae43b92cfa7e1ddec17262733355e0bf435a but to make sure there won't be any regression bugs in the future. This is an edge case but the first and the last element of an empty string are empty strings too.
Before the above mentioned PR this threw a notice `Uninitialized string offset: 0`.