Open boooyu44 opened 5 years ago
The issue is in the regex pattern which does not accept the string starting with "HTTP 2 " (it expects HTTP number.number ...). Solved by (making a fork and) replacing the regex pattern like this in Bitpay/Client/Response.php
preg_match('/^HTTP\/(\d)\s(\d+)\s(.*)/', $lines[$i], $statusLine);
While trying to create invoice the library has problem parsing response. Looks critical as it triggers exception with "undefined offset 2"
More details and stack trace on the image
https://i.imgur.com/zScVIWg.png https://i.imgur.com/4Cnmaab.png
PHP 7.3.4-2/Debian 10