8000 [VarDumper] play nice with open_basedir when looking for composer.json · symfony/symfony@1bea774 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1bea774

Browse files
[VarDumper] play nice with open_basedir when looking for composer.json
1 parent eea78fd commit 1bea774

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines 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