8000 [Config] Handle open_basedir restrictions in FileLocator · symfony/symfony@e870819 · GitHub
[go: up one dir, main page]

Skip to content

Commit e870819

Browse files
Nicofumafabpot
authored andcommitted
[Config] Handle open_basedir restrictions in FileLocator
Silence `file_exists()` call to avoid open_basedir restrictions warning. (can happen when using relative imports)
1 parent 946b96b commit e870819

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Config/FileLocator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function locate($name, $currentPath = null, $first = true)
5757
$filepaths = array();
5858

5959
foreach ($paths as $path) {
60-
if (file_exists($file = $path.DIRECTORY_SEPARATOR.$name)) {
60+
if (@file_exists($file = $path.DIRECTORY_SEPARATOR.$name)) {
6161
if (true === $first) {
6262
return $file;
6363
}

0 commit comments

Comments
 (0)
0