Skip to content

Commit 00c8d84

Browse files
committed
Remove duplicated paths
1 parent cc478a4 commit 00c8d84

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

FileLocator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public function locate($name, $currentPath = null, $first = true)
5353
array_unshift($paths, $currentPath);
5454
}
5555

56+
$paths = array_unique($paths);
5657
$filepaths = array();
5758

5859
foreach ($paths as $path) {
@@ -68,7 +69,7 @@ public function locate($name, $currentPath = null, $first = true)
6869
throw new \InvalidArgumentException(sprintf('The file "%s" does not exist (in: %s).', $name, implode(', ', $paths)));
6970
}
7071

71-
return array_values(array_unique($filepaths));
72+
return $filepaths;
7273
}
7374

7475
/**

0 commit comments

Comments
 (0)