Fix missing $extraDirs when open_basedir returns

This commit is contained in:
Florian Morello 2019-04-08 17:40:55 +02:00 committed by Fabien Potencier
parent 7a3060a867
commit e238c893e9
1 changed files with 4 additions and 1 deletions

View File

@ -51,7 +51,10 @@ class ExecutableFinder
public function find($name, $default = null, array $extraDirs = [])
{
if (ini_get('open_basedir')) {
$searchPath = explode(PATH_SEPARATOR, ini_get('open_basedir'));
$searchPath = array_merge(
explode(PATH_SEPARATOR, ini_get('open_basedir')),
$extraDirs
);
$dirs = [];
foreach ($searchPath as $path) {
// Silencing against https://bugs.php.net/69240