minor #17780 [TwigBridge] Symfony 3.1 forward compatibility (xabbuh)

This PR was merged into the 2.3 branch.

Discussion
----------

[TwigBridge] Symfony 3.1 forward compatibility

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/17743#discussion_r52718344
| License       | MIT
| Doc PR        |

Commits
-------

2991639 [TwigBridge] Symfony 3.1 forward compatibility
This commit is contained in:
Fabien Potencier 2016-02-14 14:09:49 +01:00
commit a966a8819d
1 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@
namespace Symfony\Bridge\Twig\Extension;
use Symfony\Component\Yaml\Dumper as YamlDumper;
use Symfony\Component\Yaml\Yaml;
/**
* Provides integration of the Yaml component with Twig.
@ -40,7 +41,7 @@ class YamlExtension extends \Twig_Extension
}
if (defined('Symfony\Component\Yaml\Yaml::DUMP_OBJECT')) {
$dumpObjects = (int) $dumpObjects;
return $dumper->dump($input, $inline, 0, is_bool($dumpObjects) ? Yaml::DUMP_OBJECT : 0);
}
return $dumper->dump($input, $inline, 0, false, $dumpObjects);