1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-01-09 14:14:10 +01:00

fix: allineamento php8.3

This commit is contained in:
valentina 2024-12-17 15:29:43 +01:00
parent a9b6a83e83
commit 7a400b6273

View File

@ -1,5 +1,4 @@
<?php
/*
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
* Copyright (C) DevCode s.r.l.
@ -148,7 +147,7 @@ class OAuth2 extends Model
{
$this->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