It appears a recent twitter API change has passed over the header 'transfer-encoding': with chunked as a value breaking the API.
This modification I made appears to fix the issue:
foreach($reply_headers as $reply_header) {
if (
strpos($reply_header, 'transfer-encoding') === false
) {
header($reply_header);
}
}