bug #23878 [VarDumper] play nice with open_basedir when looking for composer.json (nicolas-grekas)

This PR was merged into the 3.3 branch.

Discussion
----------

[VarDumper] play nice with open_basedir when looking for composer.json

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #23661
| License       | MIT
| Doc PR        | -

ping @pounard, can you please confirm this fixes the issue you reported?

Commits
-------

1bea774 [VarDumper] play nice with open_basedir when looking for composer.json
This commit is contained in:
Nicolas Grekas 2017-08-16 18:04:18 +02:00
commit be7751aba7

View File

@ -89,7 +89,11 @@ class LinkStub extends ConstStub
}
$parent = $dir;
while (!file_exists($parent.'/composer.json')) {
while (!@file_exists($parent.'/composer.json')) {
if (!@file_exists($parent)) {
// open_basedir restriction in effect
break;
}
if ($parent === dirname($parent)) {
return self::$composerRoots[$dir] = false;
}