Skip to content

Commit 1ece9a8

Browse files
committed
Only set next if returned
1 parent 5cd1a64 commit 1ece9a8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ConstantContact/Client.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,11 @@ private function process(\GuzzleHttp\Psr7\Response $response) : array
323323
$this->statusCode = $response->getStatusCode();
324324
$this->body = $response->getBody();
325325
$data = \json_decode($this->body, true);
326-
$this->next = $data['_links']['next']['href'] ?? '';
326+
327+
if (isset($data['_links']['next']['href']))
328+
{
329+
$this->next = $data['_links']['next']['href'];
330+
}
327331

328332
if (null !== $data)
329333
{

0 commit comments

Comments
 (0)