new Stream() with no arguments creates an empty temp steam

This commit is contained in:
PJ Dietz 2016-05-22 12:42:59 -04:00
parent 887b885eb9
commit 409ffe9371
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ class Stream implements StreamInterface
* @param resource|string $resource A file system pointer resource or
* string
*/
public function __construct($resource)
public function __construct($resource = "")
{
if (is_resource($resource) && get_resource_type($resource) === "stream") {
$this->resource = $resource;