Skip to content

Commit 3276476

Browse files
committedApr 12, 2024·
Fix get_subscriber_id definition when no subscribers found by email
1 parent 6277e11 commit 3276476

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎src/ConvertKit_API_Traits.php

+4
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,10 @@ public function get_subscriber_id(string $email_address)
863863
['email_address' => $email_address]
864864
);
865865

866+
if (!count($subscribers->subscribers)) {
867+
return false;
868+
}
869+
866870
// Return the subscriber's ID.
867871
return $subscribers->subscribers[0]->id;
868872
}

0 commit comments

Comments
 (0)
Please sign in to comment.