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 22df28a

Browse filesBrowse files
bug #58704 [HttpClient] fix for HttpClientDataCollector fails if proc_open is disabled via php.ini (ZaneCEO)
This PR was merged into the 6.4 branch. Discussion ---------- [HttpClient] fix for HttpClientDataCollector fails if proc_open is disabled via php.ini | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #58700 | License | MIT [HttpClientDataCollector::escapePayload](https://github.com/symfony/symfony/blob/7.1/src/Symfony/Component/HttpClient/DataCollector/HttpClientDataCollector.php#L256) creates a `new Process()` -> it fails if `proc_open` is disabled: > The Process class relies on proc_open, which is not available on your PHP installation. #58700 Commits ------- e28af34 [HttpClient] Fix Process-based escaping in HttpClientDataCollector 48980a2 fix for HttpClientDataCollector fails if proc_open is disabled via php.ini . Closes #58700
2 parents b30694f + e28af34 commit 22df28a
Copy full SHA for 22df28a

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+2
-2
lines changed

‎src/Symfony/Component/HttpClient/DataCollector/HttpClientDataCollector.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpClient/DataCollector/HttpClientDataCollector.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,8 @@ private function escapePayload(string $payload): string
252252
{
253253
static $useProcess;
254254

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

259259
if ('\\' === \DIRECTORY_SEPARATOR) {

0 commit comments

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