### 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_