We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4ab6c5d + 978b737 commit 261aa28Copy full SHA for 261aa28
Request.php
@@ -158,7 +158,8 @@ class Request
158
159
protected static ?\Closure $requestFactory = null;
160
161
- private string $preferredFormat;
+ private ?string $preferredFormat = null;
162
+
163
private bool $isHostValid = true;
164
private bool $isForwardedValid = true;
165
private bool $isSafeContentPreferred;
StreamedResponse.php
@@ -57,8 +57,12 @@ public function setCallback(callable $callback): static
57
return $this;
58
}
59
60
- public function getCallback(): \Closure
+ public function getCallback(): ?\Closure
61
{
62
+ if (!isset($this->callback)) {
63
+ return null;
64
+ }
65
66
return ($this->callback)(...);
67
68
0 commit comments