PHP 8.1: Fix trim() usage with a null value in Trigger

This commit is contained in:
Molkobain
2023-02-23 10:40:29 +01:00
parent 04269747b7
commit 577f125a8d

View File

@@ -251,7 +251,7 @@ abstract class TriggerOnObject extends Trigger
*/
public function IsTargetObject($iObjectId, $aChanges = array())
{
$sFilter = trim($this->Get('filter'));
$sFilter = trim($this->Get('filter') ?? '');
if (strlen($sFilter) > 0)
{
$oSearch = DBObjectSearch::FromOQL($sFilter);