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
Right now calling this triggers an error as the returned header is string|null, but really after ->has($key) returns true, we can assert that ->get($sameKey) will be string. At least as long as there is no other impure call made in between like ->remove() or ->replace()
if ($request->headers->has('foo')) {
$v = strtolower($request->headers->get('foo'));
}
The text was updated successfully, but these errors were encountered:
Yeah I guess you're right from an implementation standpoint. I don't know what would ever cause a header to receive a null value in the real world though, but definitely could happen in tests etc..
Right now calling this triggers an error as the returned header is string|null, but really after
->has($key)
returns true, we can assert that->get($sameKey)
will bestring
. At least as long as there is no other impure call made in between like->remove()
or->replace()
The text was updated successfully, but these errors were encountered: