Dep: update
주로 PHAN
This commit is contained in:
+4
-3
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
@@ -82,7 +83,7 @@ class Response implements ResponseInterface
|
||||
/**
|
||||
* @param int $status Status code
|
||||
* @param array $headers Response headers
|
||||
* @param string|null|resource|StreamInterface $body Response body
|
||||
* @param string|resource|StreamInterface|null $body Response body
|
||||
* @param string $version Protocol version
|
||||
* @param string|null $reason Reason phrase (when empty a default will be used based on the status code)
|
||||
*/
|
||||
@@ -100,7 +101,7 @@ class Response implements ResponseInterface
|
||||
$this->statusCode = $status;
|
||||
|
||||
if ($body !== '' && $body !== null) {
|
||||
$this->stream = stream_for($body);
|
||||
$this->stream = Utils::streamFor($body);
|
||||
}
|
||||
|
||||
$this->setHeaders($headers);
|
||||
@@ -134,7 +135,7 @@ class Response implements ResponseInterface
|
||||
if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) {
|
||||
$reasonPhrase = self::$phrases[$new->statusCode];
|
||||
}
|
||||
$new->reasonPhrase = $reasonPhrase;
|
||||
$new->reasonPhrase = (string) $reasonPhrase;
|
||||
return $new;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user