Fabien Potencier 3daadc5175 bug #3326 Throw exception in case non-Traversable data is passed to "filter" (Lustmored)
This PR was submitted for the 3.x branch but it was merged into the 1.x branch instead.

Discussion
----------

Throw exception in case non-Traversable data is passed to "filter"

In PHP 7.4 passing for example null to |filter generates TypeError. I was unsure how to proceed from there as filter could silently fall back to empty result, but instead I went with throwing RuntimeExceptions to be consistent with |batch and |column.

I got confused in structure of tests here, so if that should have some kind of test please push me in the right direction and I'll gladly add it.

Commits
-------

5311963e Throw exception in case non-Traversable data is passed to "filter" filter
2020-05-25 07:16:40 +02:00
2020-05-25 07:15:25 +02:00
2019-11-11 17:50:21 +01:00
2020-05-21 11:01:36 +02:00
2019-10-17 09:29:33 +02:00
2019-08-08 18:07:23 +02:00
2020-05-21 11:01:36 +02:00
2020-05-19 14:22:31 +02:00
2020-05-21 07:36:43 +02:00
2020-05-21 11:01:36 +02:00
2020-02-11 17:31:46 +01:00
2020-04-06 19:23:50 +02:00

Twig, the flexible, fast, and secure template language for PHP
==============================================================

Twig is a template language for PHP, released under the new BSD license (code
and documentation).

Twig uses a syntax similar to the Django and Jinja template languages which
inspired the Twig runtime environment.

Sponsors
--------

.. raw:: html

    <a href="https://blackfire.io/docs/introduction?utm_source=twig&utm_medium=github_readme&utm_campaign=logo">
        <img src="https://static.blackfire.io/assets/intemporals/logo/png/blackfire-io_secondary_horizontal_transparent.png?1" width="255px" alt="Blackfire.io">
    </a>

More Information
----------------

Read the `documentation`_ for more information.

.. _documentation: https://twig.symfony.com/documentation
Languages
PHP 99.9%