From 62bee2e78d8ce0bd7742c59ac6a22d50b39793dc Mon Sep 17 00:00:00 2001 From: Igor Paramonov Date: Thu, 18 Mar 2021 16:39:26 +0200 Subject: [PATCH] [sns] fixed BC break --- pkg/sns/SnsContext.php | 2 +- pkg/sns/Tests/Spec/SnsContextTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/sns/SnsContext.php b/pkg/sns/SnsContext.php index aa00be1aa..a56cb3f95 100644 --- a/pkg/sns/SnsContext.php +++ b/pkg/sns/SnsContext.php @@ -35,7 +35,7 @@ public function __construct(SnsClient $client, array $config) { $this->client = $client; $this->config = $config; - $this->topicArns = $config['topic_arns']; + $this->topicArns = isset($config['topic_arns']) ? $config['topic_arns'] : []; } /** diff --git a/pkg/sns/Tests/Spec/SnsContextTest.php b/pkg/sns/Tests/Spec/SnsContextTest.php index 6713abad0..631d4acf1 100644 --- a/pkg/sns/Tests/Spec/SnsContextTest.php +++ b/pkg/sns/Tests/Spec/SnsContextTest.php @@ -20,6 +20,6 @@ protected function createContext() { $client = $this->createMock(SnsClient::class); - return new SnsContext($client, ['topic_arns' => []]); + return new SnsContext($client, []); } }