You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
changed the title [-]Library not working on PHP 7.3.4-2/Debian 10[/-][+]Library not working on PHP 7.3.4-2/Debian 10 - "Undefined Offset 2"[/+]on Sep 14, 2019
changed the title [-]Library not working on PHP 7.3.4-2/Debian 10 - "Undefined Offset 2"[/-][+]"Undefined Offset 2" PHP 7.3.4-2/Debian 10[/+]on Sep 14, 2019
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
Activity
[-]Library no working on PHP 7.3.4-2/Debian 10[/-][+]Library not working on PHP 7.3.4-2/Debian 10[/+][-]Library not working on PHP 7.3.4-2/Debian 10[/-][+]Library not working on PHP 7.3.4-2/Debian 10 - "Undefined Offset 2"[/+][-]Library not working on PHP 7.3.4-2/Debian 10 - "Undefined Offset 2"[/-][+]"Undefined Offset 2" PHP 7.3.4-2/Debian 10[/+]thes01 commentedon Sep 19, 2019
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);Regex fix