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

View File

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