diff --git a/src/Result/GetRecordsOutput.php b/src/Result/GetRecordsOutput.php index 518dd03..fe77494 100644 --- a/src/Result/GetRecordsOutput.php +++ b/src/Result/GetRecordsOutput.php @@ -83,7 +83,7 @@ protected function populateResult(Response $response): void { $data = $response->toArray(); - $this->records = $this->populateResultRecordList($data['Records']); + $this->records = $this->populateResultRecordList($data['Records'] ?? []); $this->nextShardIterator = isset($data['NextShardIterator']) ? (string) $data['NextShardIterator'] : null; $this->millisBehindLatest = isset($data['MillisBehindLatest']) ? (int) $data['MillisBehindLatest'] : null; $this->childShards = empty($data['ChildShards']) ? [] : $this->populateResultChildShardList($data['ChildShards']); diff --git a/src/Result/ListStreamsOutput.php b/src/Result/ListStreamsOutput.php index 95d2539..87eb679 100644 --- a/src/Result/ListStreamsOutput.php +++ b/src/Result/ListStreamsOutput.php @@ -185,7 +185,7 @@ protected function populateResult(Response $response): void { $data = $response->toArray(); - $this->streamNames = $this->populateResultStreamNameList($data['StreamNames']); + $this->streamNames = $this->populateResultStreamNameList($data['StreamNames'] ?? []); $this->hasMoreStreams = filter_var($data['HasMoreStreams'], \FILTER_VALIDATE_BOOLEAN); $this->nextToken = isset($data['NextToken']) ? (string) $data['NextToken'] : null; $this->streamSummaries = empty($data['StreamSummaries']) ? [] : $this->populateResultStreamSummaryList($data['StreamSummaries']); diff --git a/src/Result/ListTagsForStreamOutput.php b/src/Result/ListTagsForStreamOutput.php index c63a8b9..4a04587 100644 --- a/src/Result/ListTagsForStreamOutput.php +++ b/src/Result/ListTagsForStreamOutput.php @@ -48,7 +48,7 @@ protected function populateResult(Response $response): void { $data = $response->toArray(); - $this->tags = $this->populateResultTagList($data['Tags']); + $this->tags = $this->populateResultTagList($data['Tags'] ?? []); $this->hasMoreTags = filter_var($data['HasMoreTags'], \FILTER_VALIDATE_BOOLEAN); } diff --git a/src/Result/PutRecordsOutput.php b/src/Result/PutRecordsOutput.php index 5aba1f6..5b3b085 100644 --- a/src/Result/PutRecordsOutput.php +++ b/src/Result/PutRecordsOutput.php @@ -70,7 +70,7 @@ protected function populateResult(Response $response): void $data = $response->toArray(); $this->failedRecordCount = isset($data['FailedRecordCount']) ? (int) $data['FailedRecordCount'] : null; - $this->records = $this->populateResultPutRecordsResultEntryList($data['Records']); + $this->records = $this->populateResultPutRecordsResultEntryList($data['Records'] ?? []); $this->encryptionType = isset($data['EncryptionType']) ? (string) $data['EncryptionType'] : null; }