8000 bug #23878 [VarDumper] play nice with open_basedir when looking for c… · symfony/symfony@be7751a · GitHub
[go: up one dir, main page]

Skip to content

Commit be7751a

Browse files
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
2 parents af0b24e + 1bea774 commit be7751a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Symfony/Component/VarDumper/Caster/LinkStub.php

+5Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ private function getComposerRoot($file, &$inVendor)
8989
}
9090

9191
$parent = $dir;
92-
while (!file_exists($parent.'/composer.json')) {
92+
while (!@file_exists($parent.'/composer.json')) {
93+
if (!@file_exists($parent)) {
94+
// open_basedir restriction in effect
95+
break;
96+
}
9397
if ($parent === dirname($parent)) {
9498
return self::$composerRoots[$dir] = false;
9599
}

0 commit comments

Comments
 (0)
0