Change record status: 
Introduced in branch: 
master
Description: 

Passing NULL to trim() or ltrim() or rtrim() is not allowed anymore in PHP 8.1. The code even explicitly checks for NULL (and not just an empty string)

The code before:

trim($var);

The code after:

trim($var ?? "");
Impacts: 
Module developers