Skip to content

Commit 9876de2

Browse files
bug #35113 [VarDumper] Fix "Undefined index: argv" when using CliContextProvider (xepozz)
This PR was submitted for the master branch but it was merged into the 4.3 branch instead. Discussion ---------- [VarDumper] Fix "Undefined index: argv" when using CliContextProvider | Q | A | ------------- | --- | Branch? | 4.1, 4.2, 4.3, 4.4 or 5.0<!-- see below --> | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | Fix #35084 | License | MIT <!-- Replace this notice by a short README for your feature/bugfix. This will help people understand your PR and can be used as a start for the documentation. Additionally (see https://symfony.com/roadmap): - Always add tests and ensure they pass. - Never break backward compatibility (see https://symfony.com/bc). - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too.) - Features and deprecations must be submitted against branch master. --> Commits ------- 340bb14 Fixed #35084
2 parents af4f99f + 340bb14 commit 9876de2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/VarDumper/Dumper/ContextProvider/CliContextProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function getContext(): ?array
2525
}
2626

2727
return [
28-
'command_line' => $commandLine = implode(' ', $_SERVER['argv']),
28+
'command_line' => $commandLine = implode(' ', $_SERVER['argv'] ?? []),
2929
'identifier' => hash('crc32b', $commandLine.$_SERVER['REQUEST_TIME_FLOAT']),
3030
];
3131
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy