silent file operation to avoid open basedir issues

Using file operations on a symlink that points to a file outside the
directories being allowed by the open_basedir setting leads to PHP
warnings being raised.
This commit is contained in:
Christian Flothmann 2016-09-28 20:06:48 +02:00 committed by Fabien Potencier
parent b4d5827b2c
commit 30c9b1ec28
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ class ExecutableFinder
}
foreach ($suffixes as $suffix) {
foreach ($dirs as $dir) {
if (is_file($file = $dir.DIRECTORY_SEPARATOR.$name.$suffix) && ('\\' === DIRECTORY_SEPARATOR || is_executable($file))) {
if (@is_file($file = $dir.DIRECTORY_SEPARATOR.$name.$suffix) && ('\\' === DIRECTORY_SEPARATOR || is_executable($file))) {
return $file;
}
}