Skip to content

Commit

Permalink
[HttpClient] Fix Process-based escaping in HttpClientDataCollector
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Oct 30, 2024
1 parent e9b0846 commit aa7bebe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DataCollector/HttpClientDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ private function escapePayload(string $payload): string
static $useProcess;

if ($useProcess ??= function_exists('proc_open') && class_exists(Process::class)) {
return (new Process([$payload]))->getCommandLine();
return substr((new Process(['', $payload]))->getCommandLine(), 3);
}

if ('\\' === \DIRECTORY_SEPARATOR) {
Expand Down

0 comments on commit aa7bebe

Please sign in to comment.