From 7a400b6273dbeab2379c5ff630b10538fff15db9 Mon Sep 17 00:00:00 2001 From: valentina Date: Tue, 17 Dec 2024 15:29:43 +0100 Subject: [PATCH] fix: allineamento php8.3 --- src/Models/OAuth2.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Models/OAuth2.php b/src/Models/OAuth2.php index 9c7d51850..f983b95ca 100644 --- a/src/Models/OAuth2.php +++ b/src/Models/OAuth2.php @@ -1,5 +1,4 @@ checkTokens(); - return unserialize($this->attributes['access_token']); + return $this->attributes['access_token'] ? unserialize($this->attributes['access_token']) : ''; } /** @@ -190,7 +189,7 @@ class OAuth2 extends Model */ protected function checkTokens() { - $access_token = unserialize($this->access_token); + $access_token = $this->access_token ? unserialize($this->access_token) : ''; if (!empty($access_token) && $access_token->hasExpired()) { // Tentativo di refresh del token di accesso