Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Typo in NoPrivateNetworkHttpClient resulting in PHP error #59244

Closed
@Jontsa

Description

@Jontsa

Symfony version(s) affected

7.1.0

Description

It looks like there is a typo in NoPrivateNetworkHttpClient since Symfony 7.1.0. The client is accessing $options array key "header" when it should be "headers".

https://github.com/symfony/symfony/blob/7.1/src/Symfony/Component/HttpClient/NoPrivateNetworkHttpClient.php#L141

$options['header'] = array_filter($options['header'], $filterContentHeaders);

results in error Undefined array key "header".

How to reproduce

n/a

Possible Solution

Replacing "header" with "headers" fixes the issue

$options['headers'] = array_filter($options['headers'], $filterContentHeaders);

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions