From 97de887222bd2892c61776caceda558ee9a8f7bd Mon Sep 17 00:00:00 2001 From: Diego Saint Esteben Date: Fri, 12 Jun 2015 16:45:17 -0300 Subject: [PATCH] Remove duplicated paths --- src/Symfony/Component/Config/FileLocator.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Config/FileLocator.php b/src/Symfony/Component/Config/FileLocator.php index c224833f26..c6600c7783 100644 --- a/src/Symfony/Component/Config/FileLocator.php +++ b/src/Symfony/Component/Config/FileLocator.php @@ -53,6 +53,7 @@ class FileLocator implements FileLocatorInterface array_unshift($paths, $currentPath); } + $paths = array_unique($paths); $filepaths = array(); foreach ($paths as $path) { @@ -68,7 +69,7 @@ class FileLocator implements FileLocatorInterface throw new \InvalidArgumentException(sprintf('The file "%s" does not exist (in: %s).', $name, implode(', ', $paths))); } - return array_values(array_unique($filepaths)); + return $filepaths; } /**