update patch 1
This commit is contained in:
+4
-4
@@ -217,7 +217,7 @@ class Response
|
||||
public function __toString(): string
|
||||
{
|
||||
return
|
||||
sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText)."\r\n".
|
||||
\sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText)."\r\n".
|
||||
$this->headers."\r\n".
|
||||
$this->getContent();
|
||||
}
|
||||
@@ -365,7 +365,7 @@ class Response
|
||||
$statusCode ??= $this->statusCode;
|
||||
|
||||
// status
|
||||
header(sprintf('HTTP/%s %s %s', $this->version, $statusCode, $this->statusText), true, $statusCode);
|
||||
header(\sprintf('HTTP/%s %s %s', $this->version, $statusCode, $this->statusText), true, $statusCode);
|
||||
|
||||
return $this;
|
||||
}
|
||||
@@ -470,7 +470,7 @@ class Response
|
||||
{
|
||||
$this->statusCode = $code;
|
||||
if ($this->isInvalid()) {
|
||||
throw new \InvalidArgumentException(sprintf('The HTTP status code "%s" is not valid.', $code));
|
||||
throw new \InvalidArgumentException(\sprintf('The HTTP status code "%s" is not valid.', $code));
|
||||
}
|
||||
|
||||
if (null === $text) {
|
||||
@@ -973,7 +973,7 @@ class Response
|
||||
public function setCache(array $options): static
|
||||
{
|
||||
if ($diff = array_diff(array_keys($options), array_keys(self::HTTP_RESPONSE_CACHE_CONTROL_DIRECTIVES))) {
|
||||
throw new \InvalidArgumentException(sprintf('Response does not support the following options: "%s".', implode('", "', $diff)));
|
||||
throw new \InvalidArgumentException(\sprintf('Response does not support the following options: "%s".', implode('", "', $diff)));
|
||||
}
|
||||
|
||||
if (isset($options['etag'])) {
|
||||
|
||||
Reference in New Issue
Block a user