fix tests with empty response body
This commit is contained in:
parent
953b64f3f2
commit
3cf4fc02f9
|
@ -45,7 +45,7 @@ class Sapi {
|
||||||
$copyStream = fopen('php://temp', 'r+');
|
$copyStream = fopen('php://temp', 'r+');
|
||||||
if (is_string($response->getBody())) {
|
if (is_string($response->getBody())) {
|
||||||
fwrite($copyStream, $response->getBody());
|
fwrite($copyStream, $response->getBody());
|
||||||
} else {
|
} else if (is_resource($response->getBody())) {
|
||||||
stream_copy_to_stream($response->getBody(), $copyStream);
|
stream_copy_to_stream($response->getBody(), $copyStream);
|
||||||
}
|
}
|
||||||
rewind($copyStream);
|
rewind($copyStream);
|
||||||
|
|
Loading…
Reference in New Issue