bug #42381 [Console] Don't pass null to preg_replace() (derrabus)
bug #42381 [Console] Don't pass null to preg_replace() (derrabus)

This PR was merged into the 5.3 branch.

Discussion
----------

[Console] Don't pass null to preg_replace()

| Q             | A
| ------------- | ---
| Branch?       | 5.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | #41552
| License       | MIT
| Doc PR        | N/A

An output formatter might return `null` (see `NullOutputFormatter`). In this case, we would pass `null` to `preg_replace()` which would trigger a deprecation warning in PHP 8.1. Let's not do that.

Commits
-------

d8b2f49bd8 Don't pass null to preg_replace()

stof/symfony,HeahDude/symfony,xabbuh/symfony,sgehrig/symfony,symfony/symfony,phramz/symfony,tucksaun/symfony,xabbuh/symfony,mpdude/symfony,phramz/symfony,ro0NL/symfony,tucksaun/symfony,nicolas-grekas/symfony,oleg-andreyev/symfony,stof/symfony,HeahDude/symfony,d-ph/symfony,ogizanagi/symfony,HeahDude/symfony,tucksaun/symfony,damienalexandre/symfony,hhamon/symfony,phramz/symfony,sgehrig/symfony,d-ph/symfony,ro0NL/symfony,paradajozsef/symfony,d-ph/symfony,Tobion/symfony,damienalexandre/symfony,curry684/symfony,nicolas-grekas/symfony,hhamon/symfony,tucksaun/symfony,HeahDude/symfony,paradajozsef/symfony,oleg-andreyev/symfony,sgehrig/symfony,mpdude/symfony,Tobion/symfony,d-ph/symfony,hhamon/symfony,oleg-andreyev/symfony,Tobion/symfony,curry684/symfony,Tobion/symfony,ro0NL/symfony,phramz/symfony,damienalexandre/symfony,ro0NL/symfony,stof/symfony,sgehrig/symfony,curry684/symfony,paradajozsef/symfony,xabbuh/symfony,curry684/symfony,mpdude/symfony,mpdude/symfony,symfony/symfony,paradajozsef/symfony,stof/symfony,ogizanagi/symfony,symfony/symfony,oleg-andreyev/symfony,hhamon/symfony,derrabus/symfony,ogizanagi/symfony,xabbuh/symfony,derrabus/symfony,damienalexandre/symfony,derrabus/symfony,derrabus/symfony,nicolas-grekas/symfony,nicolas-grekas/symfony,ogizanagi/symfony,symfony/symfony