mailchimp-api
mailchimp-api copied to clipboard
Error in MailChimp::getHeadersAsArray()
Line 337 in MailChimp::getHeadersAsArray() throws an error:
list($key, $value) = explode(': ', $line);
Since $line is not set to a key: value format string. It's set to HTTP/1.0 200 OK.
This is probably due to the zscaler proxy I have here. I can see that the if ($i === 0) is meant to catch this kind of thing, which it does as the first header is HTTP/1.1 200 Connection Established.
How about adding a check to see if this is a valid header?
if (strpos($line, ': ') === false) {
continue;
}
I too had this issue. Fixed in https://github.com/drewm/mailchimp-api/pull/243/files#diff-4658eb423d377d316ca4cdeb41f5c5daR344
Looks like you closed that PR?
Reopened https://github.com/drewm/mailchimp-api/pull/243