Skip to content

[MonologBridge] FirePHPHandler::onKernelResponse throws PHP 8.1 deprecation when no user agent is set #49392

Closed
@simonberger

Description

@simonberger

Symfony version(s) affected

5.4.20 and above

Description

When no user agent is set FirePHPHandler::onKernelResponse throws

Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated

in PHP 8.1 and above

https://github.com/symfony/symfony/blob/5.4/src/Symfony/Bridge/Monolog/Handler/FirePHPHandler.php#L44

How to reproduce

I have no reproducer but it is an obvious potential problem because HeaderBag::get is allowed to return null.

Possible Solution

No response

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