* 1.x:
Update .travis.yml
fiwed internal link
Make sure twig_include returns a string
... | ... |
@@ -14,11 +14,10 @@ The ``json_encode`` filter returns the JSON representation of a value: |
14 | 14 |
Arguments |
15 | 15 |
--------- |
16 | 16 |
|
17 |
-* ``options``: A bitmask of `json_encode options`_ (``{{ |
|
17 |
+* ``options``: A bitmask of `json_encode options`_: ``{{ |
|
18 | 18 |
data|json_encode(constant('JSON_PRETTY_PRINT')) }}``. |
19 |
- Combine constants using `Twig's bitwise operators`: ``{{ |
|
20 |
- data|json_encode(constant('JSON_PRETTY_PRINT') b-or constant('JSON_HEX_QUOT') }}``) |
|
19 |
+ Combine constants using :ref:`bitwise operators<template_logic>`: |
|
20 |
+ ``{{ data|json_encode(constant('JSON_PRETTY_PRINT') b-or constant('JSON_HEX_QUOT') }}`` |
|
21 | 21 |
|
22 | 22 |
.. _`json_encode`: https://secure.php.net/json_encode |
23 | 23 |
.. _`json_encode options`: https://secure.php.net/manual/en/json.constants.php |
24 |
-.. _`Twig's bitwise operators`: https://twig.symfony.com/doc/2.x/templates.html#logic |
... | ... |
@@ -651,6 +651,8 @@ but exists for completeness' sake. The following operators are supported: |
651 | 651 |
* ``**``: Raises the left operand to the power of the right operand. ``{{ 2 ** |
652 | 652 |
3 }}`` would return ``8``. |
653 | 653 |
|
654 |
+.. _template_logic: |
|
655 |
+ |
|
654 | 656 |
Logic |
655 | 657 |
~~~~~ |
656 | 658 |
|
... | ... |
@@ -666,7 +668,7 @@ You can combine multiple expressions with the following operators: |
666 | 668 |
|
667 | 669 |
.. note:: |
668 | 670 |
|
669 |
- Twig also support bitwise operators (``b-and``, ``b-xor``, and ``b-or``). |
|
671 |
+ Twig also supports bitwise operators (``b-and``, ``b-xor``, and ``b-or``). |
|
670 | 672 |
|
671 | 673 |
.. note:: |
672 | 674 |
|
... | ... |
@@ -1310,7 +1310,7 @@ function twig_include(Twig_Environment $env, $context, $template, $variables = a |
1310 | 1310 |
} |
1311 | 1311 |
} |
1312 | 1312 |
|
1313 |
- $result = null; |
|
1313 |
+ $result = ''; |
|
1314 | 1314 |
try { |
1315 | 1315 |
$result = $env->resolveTemplate($template)->render($variables); |
1316 | 1316 |
} catch (Twig_Error_Loader $e) { |