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 4223a5b

Browse filesBrowse files
bug #33900 [HttpKernel] Fix to populate $dotenvVars in data collector when not using putenv() (mynameisbogdan)
This PR was merged into the 4.3 branch. Discussion ---------- [HttpKernel] Fix to populate $dotenvVars in data collector when not using putenv() | Q | A | ------------- | --- | Branch? | 4.3 for bug fixes | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | | License | MIT Fix to populate $dotenvVars in data collector when not using putenv() Before: <img width="618" alt="Screen Shot 2019-10-08 at 03 53 49" src="https://user-images.githubusercontent.com/707714/66360303-49397280-e983-11e9-98b9-5272b9762dda.png"> After: <img width="614" alt="Screen Shot 2019-10-08 at 03 55 43" src="https://user-images.githubusercontent.com/707714/66360304-4b9bcc80-e983-11e9-82de-46d484daa585.png"> Commits ------- ca3fb25 [HttpKernel] fix $dotenvVars in data collector
2 parents a4f90e8 + ca3fb25 commit 4223a5b
Copy full SHA for 4223a5b

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed

‎src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ public function collect(Request $request, Response $response, \Exception $except
8080
}
8181

8282
$dotenvVars = [];
83-
foreach (explode(',', getenv('SYMFONY_DOTENV_VARS')) as $name) {
84-
if ('' !== $name && false !== $value = getenv($name)) {
85-
$dotenvVars[$name] = $value;
83+
foreach (explode(',', $_SERVER['SYMFONY_DOTENV_VARS'] ?? $_ENV['SYMFONY_DOTENV_VARS'] ?? '') as $name) {
84+
if ('' !== $name && isset($_ENV[$name])) {
85+
$dotenvVars[$name] = $_ENV[$name];
8686
}
8787
}
8888

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.