Skip to content

Commit

Permalink
bug #31012 [Process] Fix missing $extraDirs when open_basedir returns…
Browse files Browse the repository at this point in the history
… (arsonik)

This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #31012).

Discussion
----------

[Process] Fix missing $extraDirs when open_basedir returns

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  |no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #31010
| License       | MIT

Fix missing $extraDirs when open_basedir returns

Commits
-------

e238c89 Fix missing $extraDirs when open_basedir returns
  • Loading branch information
fabpot committed Apr 8, 2019
2 parents 7a3060a + e238c89 commit 6a5eac7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Symfony/Component/Process/ExecutableFinder.php
Expand Up @@ -51,7 +51,10 @@ public function addSuffix($suffix)
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
Expand Down

0 comments on commit 6a5eac7

Please sign in to comment.