Skip to content

Commit

Permalink
Merge pull request #7 from ohvitorino/add-array-key-check
Browse files Browse the repository at this point in the history
Add some safe programming
  • Loading branch information
jeroendesloovere committed May 7, 2019
2 parents 97e5b40 + adb9f05 commit 2ea4067
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Gateway/MailChimpSubscriberGateway.php
Expand Up @@ -133,7 +133,7 @@ public function hasStatus(string $email, string $listId, string $status): bool
);

// we have found a member
if (is_array($member) && !empty($member)) {
if (is_array($member) && !empty($member) && array_key_exists('status', $member)) {
return ($member['status'] === $status);
}

Expand Down

0 comments on commit 2ea4067

Please sign in to comment.