Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit be7751a

Browse filesBrowse 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
Copy full SHA for be7751a

File tree

Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/VarDumper/Caster/LinkStub.php
+5-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.