Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2991639

Browse filesBrowse files
committed
[TwigBridge] Symfony 3.1 forward compatibility
1 parent 55b71eb commit 2991639
Copy full SHA for 2991639

File tree

1 file changed

+2
-1
lines changed
Filter options

1 file changed

+2
-1
lines changed

‎src/Symfony/Bridge/Twig/Extension/YamlExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Extension/YamlExtension.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Bridge\Twig\Extension;
1313

1414
use Symfony\Component\Yaml\Dumper as YamlDumper;
15+
use Symfony\Component\Yaml\Yaml;
1516

1617
/**
1718
* Provides integration of the Yaml component with Twig.
@@ -40,7 +41,7 @@ public function encode($input, $inline = 0, $dumpObjects = false)
4041
}
4142

4243
if (defined('Symfony\Component\Yaml\Yaml::DUMP_OBJECT')) {
43-
$dumpObjects = (int) $dumpObjects;
44+
return $dumper->dump($input, $inline, 0, is_bool($dumpObjects) ? Yaml::DUMP_OBJECT : 0);
4445
}
4546

4647
return $dumper->dump($input, $inline, 0, false, $dumpObjects);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.