From a4630df32b5855a5fbb94fd1eac77e3dba7cf73d Mon Sep 17 00:00:00 2001 From: Carlos Mario Date: Wed, 8 Feb 2023 20:41:53 -0500 Subject: [PATCH] PHP 8: HOTFIX Deprecated function: trim(): Passing null to parameter of type string is deprecated. --- src/ET_Client.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ET_Client.php b/src/ET_Client.php index b06bbb0..e0d5036 100755 --- a/src/ET_Client.php +++ b/src/ET_Client.php @@ -386,10 +386,10 @@ function createPayloadForOauth2(){ $payload->grant_type = 'client_credentials'; } - if (!empty(trim($this->accountId))){ + if (!empty(trim($this->accountId ?? ''))){ $payload->account_id = $this->accountId; } - if (!empty(trim($this->scope))){ + if (!empty(trim($this->scope ?? ''))){ $payload->scope = $this->scope; }