PHP 8.1: fix deprecation warning in PHPMailer::addCustomHeader() (#2370)
PHP 8.1: fix deprecation warning in PHPMailer::addCustomHeader() (#2370)

On PHP 8.1, passing `null` to `trim()` generates a `trim(): Passing null to parameter #1 ($string) of type string is deprecated` notice.

As the `$value` is optional and may not even get set via the `name:value` parsing, the code as was, was causing this notice to be thrown.

This fix is covered by the existing unit tests and was exposed when running the tests on PHP 8.1 with `error_reporting` set to `E_ALL`.

Co-authored-by: jrfnl <50d644c256f2863fd67b233efe329d3f54f4e258@users.noreply.github.com>
nawawi/PHPMailer,jimjag/PHPMailer,jimjag/PHPMailer,nawawi/PHPMailer,PHPMailer/PHPMailer,PHPMailer/PHPMailer