Skip to content

Commit

Permalink
[VarDumper] play nice with open_basedir with looking for composer.json
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Aug 12, 2017
1 parent eea78fd commit f86dafa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Symfony/Component/VarDumper/Caster/LinkStub.php
Expand Up @@ -89,7 +89,11 @@ private function getComposerRoot($file, &$inVendor)
}

$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;
}
Expand Down

0 comments on commit f86dafa

Please sign in to comment.