Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 0a9604a

Browse files
committed
[#49] Ensure a URI instance is always present
- If none is provided, lazy-instantiate one.
1 parent 35fb0cb commit 0a9604a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/RequestTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ private function initialize($uri = null, $method = null, $body = 'php://memory',
9898
}
9999

100100
$this->method = $method ?: '';
101-
$this->uri = $uri;
101+
$this->uri = $uri ?: new Uri();
102102
$this->stream = ($body instanceof StreamInterface) ? $body : new Stream($body, 'r');
103103

104104
list($this->headerNames, $headers) = $this->filterHeaders($headers);

0 commit comments

Comments
 (0)