Skip to content
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

Update .travis.yml #2769

Merged
merged 4 commits into from Nov 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -14,6 +14,7 @@ php:
- 7.0
- 7.1
- 7.2
- 7.3
- nightly

env:
Expand Down
7 changes: 3 additions & 4 deletions doc/filters/json_encode.rst
Expand Up @@ -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<template_logic>`:
``{{ 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
4 changes: 3 additions & 1 deletion doc/templates.rst
Expand Up @@ -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
~~~~~

Expand All @@ -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::

Expand Down
2 changes: 1 addition & 1 deletion lib/Twig/Extension/Core.php
Expand Up @@ -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) {
Expand Down