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

Commit 35fb0cb

Browse files
committed
[#49] Ensure method is a string during initialization
1 parent 4136139 commit 35fb0cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/RequestTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ trait RequestTrait
3333
/**
3434
* @var string
3535
*/
36-
private $method;
36+
private $method = '';
3737

3838
/**
3939
* The request-target, if it has been provided or calculated.
@@ -97,7 +97,7 @@ private function initialize($uri = null, $method = null, $body = 'php://memory',
9797
$uri = new Uri($uri);
9898
}
9999

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

0 commit comments

Comments
 (0)