more robust initialization from request
Request::getPort is declared as int|string but can actually return null.
This commit is contained in:
parent
5cacc5dd69
commit
c6ed0f0208
@ -67,8 +67,8 @@ class RequestContext
|
||||
$this->setMethod($request->getMethod());
|
||||
$this->setHost($request->getHost());
|
||||
$this->setScheme($request->getScheme());
|
||||
$this->setHttpPort($request->isSecure() ? $this->httpPort : $request->getPort());
|
||||
$this->setHttpsPort($request->isSecure() ? $request->getPort() : $this->httpsPort);
|
||||
$this->setHttpPort($request->isSecure() || null === $request->getPort() ? $this->httpPort : $request->getPort());
|
||||
$this->setHttpsPort($request->isSecure() && null !== $request->getPort() ? $request->getPort() : $this->httpsPort);
|
||||
$this->setQueryString($request->server->get('QUERY_STRING', ''));
|
||||
|
||||
return $this;
|
||||
|
Reference in New Issue
Block a user