1.6.2: trim() on null depreciated in PHP 8.1
Added ($variable ? $variable : '') rather than ($variable ?? '') to maintain compatibility with PHP < 7
Added ($variable ? $variable : '') rather than ($variable ?? '') to maintain compatibility with PHP < 7