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 a2844c0

Browse filesBrowse files
committed
bug #25162 [HttpKernel] Read $_ENV when checking SHELL_VERBOSITY (nicolas-grekas)
This PR was merged into the 3.4 branch. Discussion ---------- [HttpKernel] Read $_ENV when checking SHELL_VERBOSITY | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Needed so that we can set the env var from `phpunit.xml.dist`. Commits ------- 7de1af4 [HttpKernel] Read $_ENV when checking SHELL_VERBOSITY
2 parents 7c0a59f + 7de1af4 commit a2844c0
Copy full SHA for a2844c0

File tree

1 file changed

+2
-2
lines changed
Filter options

1 file changed

+2
-2
lines changed

‎src/Symfony/Component/HttpKernel/Log/Logger.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Log/Logger.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ public function __construct($minLevel = null, $output = 'php://stderr', callable
4242
if (null === $minLevel) {
4343
$minLevel = LogLevel::WARNING;
4444

45-
if (isset($_SERVER['SHELL_VERBOSITY'])) {
46-
switch ((int) $_SERVER['SHELL_VERBOSITY']) {
45+
if (isset($_ENV['SHELL_VERBOSITY']) || isset($_SERVER['SHELL_VERBOSITY'])) {
46+
switch ((int) (isset($_ENV['SHELL_VERBOSITY']) ? $_ENV['SHELL_VERBOSITY'] : $_SERVER['SHELL_VERBOSITY'])) {
4747
case -1: $minLevel = LogLevel::ERROR; break;
4848
case 1: $minLevel = LogLevel::NOTICE; break;
4949
case 2: $minLevel = LogLevel::INFO; break;

0 commit comments

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