8000 Fixed the $trackContents check · symfony/symfony@c56245b · GitHub
[go: up one dir, main page]

Skip to content

Commit c56245b

Browse files
committed
Fixed the $trackContents check
1 parent eea78fd commit c56245b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Symfony/Component/DependencyInjection/ContainerBuilder.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,10 +407,12 @@ public function fileExists($path, $trackContents = true)
407407
return $exists;
408408
}
409409

410-
if ($trackContents && is_dir($path)) {
411-
$this->addResource(new DirectoryResource($path, is_string($trackContents) ? $trackContents : null));
412-
} elseif ($trackContents || is_dir($path)) {
413-
$this->addResource(new FileResource($path));
410+
if ($trackContents) {
411+
if (is_dir($path)) {
412+
$this->addResource(new DirectoryResource($path, is_string($trackContents) ? $trackContents : null));
413+
} else {
414+
$this->addResource(new FileResource($path));
415+
}
414416
}
415417

416418
return $exists;

0 commit comments

Comments
 (0)
0