From e8708195e2b50180dce085f15bec65ccabea7cfe Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Sun, 11 Sep 2016 15:39:04 +0200 Subject: [PATCH] [Config] Handle open_basedir restrictions in FileLocator Silence `file_exists()` call to avoid open_basedir restrictions warning. (can happen when using relative imports) --- src/Symfony/Component/Config/FileLocator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Config/FileLocator.php b/src/Symfony/Component/Config/FileLocator.php index c6600c7783..4816724c81 100644 --- a/src/Symfony/Component/Config/FileLocator.php +++ b/src/Symfony/Component/Config/FileLocator.php @@ -57,7 +57,7 @@ class FileLocator implements FileLocatorInterface $filepaths = array(); foreach ($paths as $path) { - if (file_exists($file = $path.DIRECTORY_SEPARATOR.$name)) { + if (@file_exists($file = $path.DIRECTORY_SEPARATOR.$name)) { if (true === $first) { return $file; }