From 0883f55328d4d3e172385df6fb1ef998c085e9eb Mon Sep 17 00:00:00 2001 From: netkas Date: Thu, 20 Mar 2025 13:04:28 -0400 Subject: [PATCH] Handle potential null values for signing keys and encryption channel secrets in ExportedSession --- src/Socialbox/Objects/Client/ExportedSession.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Socialbox/Objects/Client/ExportedSession.php b/src/Socialbox/Objects/Client/ExportedSession.php index 8a18d36..f58560e 100644 --- a/src/Socialbox/Objects/Client/ExportedSession.php +++ b/src/Socialbox/Objects/Client/ExportedSession.php @@ -65,8 +65,8 @@ $this->clientTransportEncryptionKey = $data['client_transport_encryption_key']; $this->serverTransportEncryptionKey = $data['server_transport_encryption_key']; $this->defaultSigningKey = $data['default_signing_key'] ?? null; - $this->signingKeys = array_map(fn($key) => SignatureKeyPair::fromArray($key), $data['signing_keys']); - $this->encryptionChannelSecrets = array_map(fn($key) => EncryptionChannelSecret::fromArray($key), $data['encryption_channel_secrets']); + $this->signingKeys = array_map(fn($key) => SignatureKeyPair::fromArray($key), $data['signing_keys'] ?? []); + $this->encryptionChannelSecrets = array_map(fn($key) => EncryptionChannelSecret::fromArray($key), $data['encryption_channel_secrets'] ?? []); } /**