From 9859f1934ca30774fefb192a04c74280bf4c3b2b Mon Sep 17 00:00:00 2001 From: Arthur Guy Date: Wed, 5 Jul 2023 15:12:10 +0100 Subject: [PATCH] Update CustomAccountWatchlistCaSearchConfigResponse.php Check for the array key before trying to use it. Fixes #328 --- .../Retrieve/CustomAccountWatchlistCaSearchConfigResponse.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DocScan/Session/Retrieve/CustomAccountWatchlistCaSearchConfigResponse.php b/src/DocScan/Session/Retrieve/CustomAccountWatchlistCaSearchConfigResponse.php index d1372b54..efa7819d 100644 --- a/src/DocScan/Session/Retrieve/CustomAccountWatchlistCaSearchConfigResponse.php +++ b/src/DocScan/Session/Retrieve/CustomAccountWatchlistCaSearchConfigResponse.php @@ -35,7 +35,7 @@ public function __construct(array $searchConfig) $this->apiKey = $searchConfig['api_key']; $this->monitoring = $searchConfig['monitoring']; $this->clientRef = $searchConfig['client_ref']; - $this->tags = json_decode($searchConfig['tags'], true); + $this->tags = array_key_exists('tags', $searchConfig) ? json_decode($searchConfig['tags'], true) : []; } /**