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
and a few lines down too.
That gets converted into an ErrorException in onError() so the proper send() HTTP exception handling is effectively bypassed.
The text was updated successfully, but these errors were encountered:
That triggered this exception in my code:
ErrorException: Undefined variable: http_response_header at .../vendor/datto/json-rpc-http/src/Client.php line 229.
Bear in mind this special variable is somehow protected and not populated in some situation when the peer server close the connection early on (ssl reset)
=> Undefined variable: http_response_header
A code like this one:
$response = @file_get_contents($url);
empty($http_response_header) && $http_response_header = array('HTTP/1.1 400 Bad request');
Will return a cryptic error message:
Fatal error: Call to undefined function array() on line 2
--
Should you want to cope with this situation:
$hdrs = array('HTTP/1.1 400 Bad request');
!empty($htp_response_header) && $hdrs = $http_response_headers;
While there is obviously a root problem which needs to be fixed, this makes it practically impossible to actually debug it, because all real error details are hidden from the surface
Here it is:
php-json-rpc-http/src/Client.php
Line 226 in db15a07
and a few lines down too.
That gets converted into an ErrorException in onError() so the proper send() HTTP exception handling is effectively bypassed.
The text was updated successfully, but these errors were encountered: