diff --git a/DataCollector/HttpClientDataCollector.php b/DataCollector/HttpClientDataCollector.php index 8e85462..a749aa6 100644 --- a/DataCollector/HttpClientDataCollector.php +++ b/DataCollector/HttpClientDataCollector.php @@ -252,8 +252,8 @@ private function escapePayload(string $payload): string { static $useProcess; - if ($useProcess ??= class_exists(Process::class)) { - return (new Process([$payload]))->getCommandLine(); + if ($useProcess ??= function_exists('proc_open') && class_exists(Process::class)) { + return substr((new Process(['', $payload]))->getCommandLine(), 3); } if ('\\' === \DIRECTORY_SEPARATOR) {