From a55f76bf4fc729175d8909baa71bfb19a585b802 Mon Sep 17 00:00:00 2001 From: Chris Wilkinson Date: Fri, 5 Oct 2018 07:46:05 +0100 Subject: [PATCH 1/3] Make sure twig_include returns a string --- lib/Twig/Extension/Core.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Twig/Extension/Core.php b/lib/Twig/Extension/Core.php index c3ccd54d0..9d408e178 100644 --- a/lib/Twig/Extension/Core.php +++ b/lib/Twig/Extension/Core.php @@ -1527,7 +1527,7 @@ function twig_include(Twig_Environment $env, $context, $template, $variables = a } } - $result = null; + $result = ''; try { $result = $env->resolveTemplate($template)->render($variables); } catch (Twig_Error_Loader $e) { From f2b8e9acad5b7d786448c02d92b2b077a9366743 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 12 Oct 2018 07:15:08 -0700 Subject: [PATCH 2/3] fiwed internal link --- doc/filters/json_encode.rst | 7 +++---- doc/templates.rst | 4 +++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/filters/json_encode.rst b/doc/filters/json_encode.rst index e93199f63..f02a7a89a 100644 --- a/doc/filters/json_encode.rst +++ b/doc/filters/json_encode.rst @@ -14,11 +14,10 @@ The ``json_encode`` filter returns the JSON representation of a value: Arguments --------- -* ``options``: A bitmask of `json_encode options`_ (``{{ +* ``options``: A bitmask of `json_encode options`_: ``{{ data|json_encode(constant('JSON_PRETTY_PRINT')) }}``. - Combine constants using `Twig's bitwise operators`: ``{{ - data|json_encode(constant('JSON_PRETTY_PRINT') b-or constant('JSON_HEX_QUOT') }}``) + Combine constants using :ref:`bitwise operators`: + ``{{ data|json_encode(constant('JSON_PRETTY_PRINT') b-or constant('JSON_HEX_QUOT') }}`` .. _`json_encode`: https://secure.php.net/json_encode .. _`json_encode options`: https://secure.php.net/manual/en/json.constants.php -.. _`Twig's bitwise operators`: https://twig.symfony.com/doc/2.x/templates.html#logic diff --git a/doc/templates.rst b/doc/templates.rst index bbce18747..23f1b8b7e 100644 --- a/doc/templates.rst +++ b/doc/templates.rst @@ -659,6 +659,8 @@ but exists for completeness' sake. The following operators are supported: * ``**``: Raises the left operand to the power of the right operand. ``{{ 2 ** 3 }}`` would return ``8``. +.. _template_logic: + Logic ~~~~~ @@ -674,7 +676,7 @@ You can combine multiple expressions with the following operators: .. note:: - Twig also support bitwise operators (``b-and``, ``b-xor``, and ``b-or``). + Twig also supports bitwise operators (``b-and``, ``b-xor``, and ``b-or``). .. note:: From 721fb3f61536cc359a3bb41d8c853d776aef32b9 Mon Sep 17 00:00:00 2001 From: Andrey Bolonin Date: Sat, 27 Oct 2018 11:34:14 +0300 Subject: [PATCH 3/3] Update .travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index a7d1a4101..be9bd9f91 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,7 @@ php: - 7.0 - 7.1 - 7.2 + - 7.3 - nightly env: