-
Notifications
You must be signed in to change notification settings - Fork 2k
Undefined offset: 1 (enabled HTTP/2 support in the Curl library used by PHP) #1076
Comments
I also recommend using the standard delimiter (/) instead of the one used in your code (|). |
Just ran into this after libcurl was automatically updated: Will submit a PR. |
Dangerous programming- they are assuming that they will always get a match back from preg_match. Atleast it should be |
This won't work in this case.
|
The solution in @bytestream's pull request avoids using a complicated regular expression entirely:
It also may be good to throw an exception if $status is not a valid number. |
Why fix me that do not work, Please give me. Thank you. |
https://github.com/facebook/php-graph-sdk/blob/3138249d85e8dc040f15bedd3581a3c616f49005/src/Facebook/Http/GraphRawResponse.php#L107
From today I am getting error like in title. I can see in logs this call:
Facebook\Http\GraphRawResponse->setHttpResponseCodeFromHeader('HTTP/2 200 ')
It doesn't match to regex in code:
|HTTP/\d\.\d\s+(\d+)\s+.*|
The problem appeared after we enabled HTTP/2 support in the Curl library used by PHP.
It should be solve problem i guess:
/HTTP\/\d(?:\.\d)?\s+(\d+)\s+/
Someone else getting the same error?
We are using SDK v. 5.6.3.
The text was updated successfully, but these errors were encountered: