From 0969dfb6678cc09c5b5d76d9cedbfe632a5df56f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E6=AD=A3=E8=B6=85?= Date: Wed, 2 Mar 2022 11:21:04 +0800 Subject: [PATCH] bugfix. --- src/User.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/User.php b/src/User.php index a14d429..3786aa7 100644 --- a/src/User.php +++ b/src/User.php @@ -107,14 +107,14 @@ public function jsonSerialize(): array return $this->attributes; } - public function __serialize() + public function __serialize(): array { - return serialize($this->attributes); + return $this->attributes; } - public function __unserialize($serialized) + public function __unserialize(array $serialized) { - $this->attributes = unserialize($serialized) ?: []; + $this->attributes = $serialized ?: []; } public function getProvider(): \Overtrue\Socialite\Contracts\ProviderInterface