| @@ -41,9 +41,9 @@ | ||
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | 43 | * @param resource|string $body |
| 44 | 44 | */ |
| 45 | - public function __construct($body, ?string $charset = 'utf-8', string $subtype = 'plain', string $encoding = null) | |
| 45 | + public function __construct($body, ?string $charset = 'utf-8', string $subtype = 'plain', ?string $encoding = null) | |
| 46 | 46 | { |
| 47 | 47 | unset($this->_headers); |
| 48 | 48 | |
| 49 | 49 | parent::__construct(); |
| @@ -196,8 +196,9 @@ | ||
| 196 | 196 | { |
| 197 | 197 | // convert resources to strings for serialization |
| 198 | 198 | if (null !== $this->seekable) { |
| 199 | 199 | $this->body = $this->getBody(); |
| 200 | + $this->seekable = null; | |
| 200 | 201 | } |
| 201 | 202 | |
| 202 | 203 | $this->_headers = $this->getHeaders(); |
| 203 | 204 | |