[Debug] Fixed cast of stream

Reproducer:

```
$socket = stream_socket_server("tcp://0:9911", $e1, $e2, STREAM_SERVER_LISTEN);
dump($socket);
```
This commit is contained in:
Grégoire Pineau 2016-12-27 18:22:20 +01:00
parent f4a635957e
commit 814ba5c477

View File

@ -41,7 +41,9 @@ class ResourceCaster
public static function castStream($stream, array $a, Stub $stub, $isNested)
{
$a = stream_get_meta_data($stream) + static::castStreamContext($stream, $a, $stub, $isNested);
$a['uri'] = new LinkStub($a['uri']);
if (isset($a['uri'])) {
$a['uri'] = new LinkStub($a['uri']);
}
return $a;
}