Skip to content

Commit a17bee4

Browse files
committed
Merge branch '2.3' into 2.7
Conflicts: src/Symfony/Bundle/TwigBundle/Tests/Controller/ExceptionControllerTest.php
2 parents ba26cd0 + 8549a3f commit a17bee4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Loader/YamlFileLoader.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function load($file, $type = null)
5858
}
5959

6060
try {
61-
$config = $this->yamlParser->parse(file_get_contents($path));
61+
$parsedConfig = $this->yamlParser->parse(file_get_contents($path));
6262
} catch (ParseException $e) {
6363
throw new \InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML.', $path), 0, $e);
6464
}
@@ -67,16 +67,16 @@ public function load($file, $type = null)
6767
$collection->addResource(new FileResource($path));
6868

6969
// empty file
70-
if (null === $config) {
70+
if (null === $parsedConfig) {
7171
return $collection;
7272
}
7373

7474
// not an array
75-
if (!is_array($config)) {
75+
if (!is_array($parsedConfig)) {
7676
throw new \InvalidArgumentException(sprintf('The file "%s" must contain a YAML array.', $path));
7777
}
7878

79-
foreach ($config as $name => $config) {
79+
foreach ($parsedConfig as $name => $config) {
8080
if (isset($config['pattern'])) {
8181
if (isset($config['path'])) {
8282
throw new \InvalidArgumentException(sprintf('The file "%s" cannot define both a "path" and a "pattern" attribute. Use only "path".', $path));

0 commit comments

Comments
 (0)